projects
/
soc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
55f6118
)
whoops search/replace error
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sun, 2 Jun 2019 12:37:08 +0000
(13:37 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sun, 2 Jun 2019 12:37:08 +0000
(13:37 +0100)
src/experiment/compldst.py
patch
|
blob
|
history
diff --git
a/src/experiment/compldst.py
b/src/experiment/compldst.py
index adbdc0f99998fca78fdcb2e8497df6835ba69f2c..15aebee0fe0ff2f6c27f74f116e0e7b71dc6004d 100644
(file)
--- a/
src/experiment/compldst.py
+++ b/
src/experiment/compldst.py
@@
-133,24
+133,24
@@
class LDSTCompUnit(Elaboratable):
# NOTE: use sync to stop combinatorial loops.
# opcode latch - inverted so that busy resets to 0
# NOTE: use sync to stop combinatorial loops.
# opcode latch - inverted so that busy resets to 0
- sync
omb
+= opc_l.s.eq(issue_i) # XXX NOTE: INVERTED FROM book!
- sync
omb
+= opc_l.r.eq(reset_b) # XXX NOTE: INVERTED FROM book!
+ sync += opc_l.s.eq(issue_i) # XXX NOTE: INVERTED FROM book!
+ sync += opc_l.r.eq(reset_b) # XXX NOTE: INVERTED FROM book!
# src operand latch
# src operand latch
- sync
omb
+= src_l.s.eq(issue_i)
- sync
omb
+= src_l.r.eq(reset_r)
+ sync += src_l.s.eq(issue_i)
+ sync += src_l.r.eq(reset_r)
# addr latch
# addr latch
- sync
omb
+= adr_l.s.eq(self.go_rd_i)
- sync
omb
+= adr_l.r.eq(reset_a)
+ sync += adr_l.s.eq(self.go_rd_i)
+ sync += adr_l.r.eq(reset_a)
# dest operand latch
# dest operand latch
- sync
omb
+= req_l.s.eq(self.go_ad_i)
- sync
omb
+= req_l.r.eq(reset_w)
+ sync += req_l.s.eq(self.go_ad_i)
+ sync += req_l.r.eq(reset_w)
# store latch
# store latch
- sync
omb
+= sto_l.s.eq(self.go_ad_i)
- sync
omb
+= sto_l.r.eq(reset_s)
+ sync += sto_l.s.eq(self.go_ad_i)
+ sync += sto_l.r.eq(reset_s)
# outputs: busy and release signals
busy_o = self.busy_o
# outputs: busy and release signals
busy_o = self.busy_o
@@
-170,16
+170,16
@@
class LDSTCompUnit(Elaboratable):
# the counter is just for demo purposes, to get the ALUs of different
# types to take arbitrary completion times
with m.If(opc_l.qn):
# the counter is just for demo purposes, to get the ALUs of different
# types to take arbitrary completion times
with m.If(opc_l.qn):
- sync
omb
+= self.counter.eq(0) # reset counter when not busy
+ sync += self.counter.eq(0) # reset counter when not busy
with m.If(req_l.qn & busy_o & (self.counter == 0)):
with m.If(self.oper_i == 2): # MUL, to take 5 instructions
with m.If(req_l.qn & busy_o & (self.counter == 0)):
with m.If(self.oper_i == 2): # MUL, to take 5 instructions
- sync
omb
+= self.counter.eq(5)
+ sync += self.counter.eq(5)
with m.Elif(self.oper_i == 3): # SHIFT to take 7
with m.Elif(self.oper_i == 3): # SHIFT to take 7
- sync
omb
+= self.counter.eq(7)
+ sync += self.counter.eq(7)
with m.Else(): # ADD/SUB to take 2
with m.Else(): # ADD/SUB to take 2
- sync
omb
+= self.counter.eq(2)
+ sync += self.counter.eq(2)
with m.If(self.counter > 1):
with m.If(self.counter > 1):
- sync
omb
+= self.counter.eq(self.counter - 1)
+ sync += self.counter.eq(self.counter - 1)
with m.If(self.counter == 1):
# write req release out. waits until shadow is dropped.
comb += self.req_rel_o.eq(wr_q & busy_o & self.shadown_i)
with m.If(self.counter == 1):
# write req release out. waits until shadow is dropped.
comb += self.req_rel_o.eq(wr_q & busy_o & self.shadown_i)