Exemple #1
0
 def create(self):
     # TODO: It would be nice to test with slen=128, but spike currently
     # requires vlen==slen.
     return testlib.MultiSpike([
         #                testlib.Spike(self, isa="RV64IMAFDV", abstract_rti=30,
         #                    support_hasel=False, support_abstract_csr=False,
         #                    vlen=512, elen=64, slen=512, harts=self.harts[:2]),
         testlib.Spike(
             self,
             isa="RV32IMAFDCV",
             dmi_rti=4,
             support_abstract_csr=True,
             support_haltgroups=False,
             # elen must be at least 64 because D is supported.
             elen=64,
             harts=self.harts[2:]),
         testlib.Spike(
             self,
             isa="RV32IMAFDCV",
             dmi_rti=4,
             support_abstract_csr=True,
             support_haltgroups=False,
             # elen must be at least 64 because D is supported.
             elen=64,
             harts=self.harts[2:])
     ])
Exemple #2
0
 def create(self):
     return testlib.Spike(self,
                          progbufsize=0,
                          dmi_rti=4,
                          support_hasel=False,
                          support_abstract_csr=True,
                          support_haltgroups=False)
Exemple #3
0
 def create(self):
     # 64-bit FPRs on 32-bit target
     return testlib.Spike(self,
                          isa="RV32IMAFDC",
                          dmi_rti=4,
                          support_abstract_csr=True,
                          support_haltgroups=False)
Exemple #4
0
 def setUp(self):
     self.binary = testlib.compile("debug.c")
     self.spike = testlib.Spike(self.binary, halted=False)
     self.gdb = testlib.Gdb()
     self.gdb.command("file %s" % self.binary)
     self.gdb.command("target extended-remote localhost:%d" %
                      self.spike.port)
 def create(self):
     # 32-bit FPRs only
     return testlib.Spike(self,
                          isa="RV64IMAFC",
                          progbufsize=0,
                          abstract_rti=30,
                          support_abstract_csr=True)
Exemple #6
0
    def setUp(self):
        length = 2**20
        fd = file("data.c", "w")
        fd.write("#include <stdint.h>\n")
        fd.write("uint32_t length = %d;\n" % length)
        fd.write("uint8_t d[%d] = {\n" % length)
        self.crc = 0
        for i in range(length / 16):
            fd.write("  /* 0x%04x */ " % (i * 16))
            for _ in range(16):
                value = random.randrange(1 << 8)
                fd.write("%d, " % value)
                self.crc = binascii.crc32("%c" % value, self.crc)
            fd.write("\n")
        fd.write("};\n")
        fd.write("uint8_t *data = &d[0];\n")
        fd.close()

        self.binary = testlib.compile("checksum.c", "data.c", "start.S",
                                      "-mcmodel=medany", "-T",
                                      "standalone.lds", "-nostartfiles")
        self.spike = testlib.Spike(None, halted=True)
        self.gdb = testlib.Gdb()
        self.gdb.command("file %s" % self.binary)
        self.gdb.command("target extended-remote localhost:%d" %
                         self.spike.port)
 def create(self):
     return testlib.Spike(self,
                          isa="RV64IMAFDV",
                          abstract_rti=30,
                          support_hasel=False,
                          support_abstract_csr=False,
                          vlen=512,
                          elen=64)
Exemple #8
0
 def create(self):
     return testlib.MultiSpike([
         testlib.Spike(self,
                       isa="RV64IMAFDV",
                       support_hasel=False,
                       support_abstract_csr=False,
                       vlen=512,
                       elen=64,
                       harts=self.harts[2:]),
         testlib.Spike(
             self,
             isa="RV32IMAFDCV",
             support_abstract_csr=True,
             support_haltgroups=False,
             # elen must be at least 64 because D is supported.
             elen=64,
             harts=self.harts[:2]),
     ])
Exemple #9
0
 def setUp(self):
     self.binary = testlib.compile("mprv.S", "-T", "standalone.lds",
                                   "-nostartfiles")
     self.spike = testlib.Spike(None, halted=True)
     self.gdb = testlib.Gdb()
     self.gdb.command("file %s" % self.binary)
     self.gdb.command("target extended-remote localhost:%d" %
                      self.spike.port)
     self.gdb.command("load")
Exemple #10
0
 def create(self):
     # 64-bit FPRs on 32-bit target
     return testlib.Spike(
         self,
         isa="RV32IMAFDCV",
         dmi_rti=4,
         support_abstract_csr=True,
         support_haltgroups=False,
         # elen must be at least 64 because D is supported.
         elen=64)
Exemple #11
0
 def create(self):
     # TODO: It would be nice to test with slen=128, but spike currently
     # requires vlen==slen.
     return testlib.Spike(self,
                          isa="RV64IMAFDV",
                          abstract_rti=30,
                          support_hasel=False,
                          support_abstract_csr=False,
                          vlen=512,
                          elen=64,
                          slen=512)
Exemple #12
0
 def create(self):
     return testlib.Spike(self, isa="RV32IMAFC", progbufsize=0)
 def create(self):
     return testlib.Spike(self, isa="RV32IMAV", support_hasel=True,
             support_haltgroups=False)
Exemple #14
0
 def create(self):
     return testlib.Spike(self, isa="RV64IMAFD", abstract_rti=30)
Exemple #15
0
 def create(self):
     return testlib.Spike(self, isa="RV32IMAFC")
Exemple #16
0
 def test_nogdb(self):
     """Make sure that we can run past ebreak when gdb isn't attached."""
     spike = testlib.Spike(self.binary, timeout=10)
     result = spike.wait()
     self.assertEqual(result, 0)
Exemple #17
0
 def create(self):
     # 64-bit FPRs on 32-bit target
     return testlib.Spike(self, isa="RV32IMAFDC")
 def create(self):
     return testlib.Spike(self, abstract_rti=30)
Exemple #19
0
 def server(self):
     return testlib.Spike(parsed.cmd, halted=True)
Exemple #20
0
 def create(self):
     # 32-bit FPRs only
     return testlib.Spike(self, isa="RV64IMAFC")
Exemple #21
0
 def create(self):
     return testlib.Spike(self,
                          abstract_rti=30,
                          support_hasel=False,
                          support_abstract_csr=False)
Exemple #22
0
 def create(self):
     return testlib.Spike(self, isa="RV64IMAFD")
 def create(self):
     return testlib.Spike(self, progbufsize=0)
Exemple #24
0
 def create(self):
     return testlib.Spike(self)
Exemple #25
0
 def test_noport(self):
     """Make sure that we can run past ebreak when --gdb-port isn't used."""
     spike = testlib.Spike(self.binary, with_gdb=False, timeout=10)
     result = spike.wait()
     self.assertEqual(result, 0)
Exemple #26
0
 def create(self):
     return testlib.Spike(self,
                          isa="RV32IMAFC",
                          progbufsize=0,
                          dmi_rti=4,
                          support_abstract_csr=True)
 def server(self):
     return testlib.Spike(self.cmd, halted=True, xlen=32)
Exemple #28
0
 def create(self):
     return testlib.Spike(self, support_hasel=False)
 def target(self):
     return testlib.Spike(self.sim_cmd, xlen=32)