update to new revision nmigen
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 17 Jan 2020 14:14:18 +0000 (14:14 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 17 Jan 2020 14:14:18 +0000 (14:14 +0000)
src/experiment/score6600.py
src/scoreboard/addr_match.py
src/scoreboard/issue_unit.py

index b3d1763c9017aa4967597cfca23957f2a7b8ce7f..209bc99c28e8dae05a8e4003c697aac9fbb385a1 100644 (file)
@@ -1,5 +1,6 @@
 from nmigen.compat.sim import run_simulation
 from nmigen.cli import verilog, rtlil
+from nmigen.hdl.ast import unsigned
 from nmigen import Module, Const, Signal, Array, Cat, Elaboratable, Memory
 
 from regfile.regfile import RegFileArray, treereduce
@@ -421,9 +422,9 @@ class Scoreboard(Elaboratable):
         self.ls_imm_i = Signal(rwid, reset_less=True)
 
         # inputs
-        self.int_dest_i = Signal(max=n_regs, reset_less=True) # Dest R# in
-        self.int_src1_i = Signal(max=n_regs, reset_less=True) # oper1 R# in
-        self.int_src2_i = Signal(max=n_regs, reset_less=True) # oper2 R# in
+        self.int_dest_i = Signal(range(n_regs), reset_less=True) # Dest R# in
+        self.int_src1_i = Signal(range(n_regs), reset_less=True) # oper1 R# in
+        self.int_src2_i = Signal(range(n_regs), reset_less=True) # oper2 R# in
         self.reg_enable_i = Signal(reset_less=True) # enable reg decode
 
         # outputs
@@ -742,7 +743,7 @@ class IssueToScoreboard(Elaboratable):
         self.opw = opwid
         self.n_regs = n_regs
 
-        mqbits = (int(log(qlen) / log(2))+2, False)
+        mqbits = unsigned(int(log(qlen) / log(2))+2)
         self.p_add_i = Signal(mqbits) # instructions to add (from data_i)
         self.p_ready_o = Signal() # instructions were added
         self.data_i = Instruction.nq(n_in, "data_i", rwid, opwid)
index 9d8e08e4542bd6338442101f2ed0a1c380a9284e..e42bbe527c1c069011819dc683e9298e19412200 100644 (file)
@@ -61,7 +61,8 @@ class PartialAddrMatch(Elaboratable):
         sync = m.d.sync
 
         m.submodules.l = l = SRLatch(llen=self.n_adr, sync=False)
-        addrs_r = Array(Signal(self.bitwid, "a_r") for i in range(self.n_adr))
+        addrs_r = Array(Signal(self.bitwid, name="a_r") \
+                                for i in range(self.n_adr))
 
         # latch set/reset
         comb += l.s.eq(self.addr_en_i)
index fb7578d9732d8afa0a2f8a6dd8e01a41be9b4662..3ec2a31ced3dfa11510ec811602ad49fff325bf3 100644 (file)
@@ -18,9 +18,9 @@ class RegDecode(Elaboratable):
 
         # inputs
         self.enable_i = Signal(reset_less=True) # enable decoders
-        self.dest_i = Signal(max=wid, reset_less=True) # Dest R# in
-        self.src1_i = Signal(max=wid, reset_less=True) # oper1 R# in
-        self.src2_i = Signal(max=wid, reset_less=True) # oper2 R# in
+        self.dest_i = Signal(range(wid), reset_less=True) # Dest R# in
+        self.src1_i = Signal(range(wid), reset_less=True) # oper1 R# in
+        self.src2_i = Signal(range(wid), reset_less=True) # oper2 R# in
 
         # outputs
         self.dest_o = Signal(wid, reset_less=True) # Dest unary out