Check-in some changes to run the kernels correctly - #323
Conversation
- Add CgraRTL_relu4x4_test_from_yaml.py: ReLU kernel test on 4x4 Mesh CGRA using relu.yaml compiled kernel config (II=5, 32 iterations) - Fix script_generator.py: swap STORE src_operands to match MemUnitRTL hardware expectation (in0=address, in1=data vs YAML order [data, addr])
…flag Bug #1 - CrossbarRTL all-or-nothing: Stale prologued data blocked entire crossbar - Mask recv_valid_vector, exclude prologued from send/recv_required_vector - Gate changed: recv_valid_or_prologue_allowing_vector Bug #2 - PhiRTL shared first flag: Multiple PHI_START on same tile failed - Detect iteration wrap via ctrl_addr, clear s.first only at boundaries - Added prev_ctrl_addr tracking Tests: ReLU 379 cycles (pass), SpMV 759 cycles (pass)
|
Added cleanup commit ce34b9b:
Python syntax checks pass. Pytest collection from the repository root is blocked by the project package layout ( |
# Conflicts: # fu/single/CompRTL.py # fu/single/test/CompRTL_test.py
Detailed RTL-level change summaryThis comment covers every 1.
|
|
Update: The translation works well. The signal_a[signal_b] can be translated. |
|
Update: The reason of CI test fail is the invalid var that Verilog not support |
what is the |
There was a problem hiding this comment.
The trace-related changes in this file can be reverted.
There was a problem hiding this comment.
the changes in this file can be reverted.
hmm, if you think this can help debugging, maybe we can also leave it there? as long as it can be conditionally invoked.
There was a problem hiding this comment.
we can check this in if you want.
Oh sorry It is a typo, I mean char😂 |
| s.recv_data_from_routing_crossbar[i].rdy @= \ | ||
| (s.inport_opt.operation == OPT_NAH) | \ | ||
| (s.inport_opt.fu_in[i] == 0) | \ | ||
| reg_towards_fu | \ | ||
| s.send_data_to_fu[i].rdy |
| # lane, the register bank supplies the FU, or the FU is ready. | ||
| s.recv_data_from_routing_crossbar[i].rdy @= \ | ||
| (s.inport_opt.operation == OPT_NAH) | \ | ||
| (s.inport_opt.fu_in[i] == 0) | \ |
There was a problem hiding this comment.
do you think we can remove this line? the "i" in fu_in[] is not the "i" for the routing_crossbar...
The 'fu_in[]` can shuffle the chosen inports.
There was a problem hiding this comment.
Or change it to sth like:
bank_used_by_fu = (s.inport_opt.fu_in[0] == (i + 1))
for slot in range(1, num_reg_banks):
bank_used_by_fu = bank_used_by_fu | (s.inport_opt.fu_in[slot] == (i + 1))
...
s.recv_data_from_routing_crossbar[i].rdy @= \
(s.inport_opt.operation == OPT_NAH) | \
~bank_used_by_fu | \
reg_towards_fu | \
s.send_data_to_fu[i].rdy
though I feel it is over-complicated.
| s.send_rdy_vector @= 0 | ||
| for i in range(num_outports): | ||
| # The `outport_towards_local_base_id` indicates the number of outports that go to other tiles. | ||
| # The `num_inports` indicates the number of outports that go to other tiles. |
There was a problem hiding this comment.
I don't think we need to change this comment of outport_towards_local_base_id -> num_inports, the original comment is correct.
| # The `num_inports` indicates the number of outports that go to other tiles. | ||
| # Specifically, if the compute already done, we shouldn't care the ones | ||
| # (i.e., i >= outport_towards_local_base_id) go to the FU's inports. In other words, we skip | ||
| # (i.e., i >= num_inports) go to the FU's inports. In other words, we skip |
| # When prologue is active for this output's input, don't | ||
| # require the downstream channel to be ready -- we won't be | ||
| # sending any data through it during prologue anyway. | ||
| s.send_rdy_vector[i] @= s.send_data[i].rdy | \ |
There was a problem hiding this comment.
then can we change s.send_rdy_vector to s.send_rdy_or_during_prologue_vector?
| # trick the crossbar into attempting a send, and if the | ||
| # destination channel is full the all-or-nothing semantics | ||
| # cause a deadlock. | ||
| s.recv_valid_vector[i] @= s.recv_data_val[s.in_dir_local[i]] & \ |
There was a problem hiding this comment.
Can we then change this recv_valid_vector to recv_valid_excluding_prologue_vector
| # lane, the register bank supplies the FU, or the FU is ready. | ||
| s.recv_data_from_routing_crossbar[i].rdy @= \ | ||
| (s.inport_opt.operation == OPT_NAH) | \ | ||
| (s.inport_opt.fu_in[i] == 0) | \ |
There was a problem hiding this comment.
Or change it to sth like:
bank_used_by_fu = (s.inport_opt.fu_in[0] == (i + 1))
for slot in range(1, num_reg_banks):
bank_used_by_fu = bank_used_by_fu | (s.inport_opt.fu_in[slot] == (i + 1))
...
s.recv_data_from_routing_crossbar[i].rdy @= \
(s.inport_opt.operation == OPT_NAH) | \
~bank_used_by_fu | \
reg_towards_fu | \
s.send_data_to_fu[i].rdy
though I feel it is over-complicated.
|
Hi @Jackcuii, as long as you can resolve my comments, it should be okay to check in. Plz try to resolve them ASAP. Thanks! |
Okay~ I am checking in the logics the comments mentioned in the branch one by one to make sure all the yaml tests can still pass. It is somehow black-boxed😂 |
I understand that. Can you then ask your agent to apply my suggestions to see whether it works? |
No description provided.