Add Dockerfile#69
Conversation
After talking with GPT, I think the issue is Synopsys or Candence accepts SVerilog, and the lefthand indexing can be unrolled by them during static time; however, after GPT said: means that you're trying to do a dynamic part-select (a variable slice) on the left-hand side (LHS) of an assignment — something Yosys (and synthesizable Verilog in general) doesn't support. Here's the problematic line: recv_data__rdy[9 - in_dir_local[sv2v_cast_4(i)]+:1] = ...;Why this failsVerilog allows dynamic indexing (like In this case, you're computing the index for a 1-bit wide dynamic slice starting at How to fixYou must rewrite this assignment without a dynamic part-select on the LHS. Typically, this means rewriting it with an If the expression always @* begin
recv_data__rdy = ...; // default or previous value
case (in_dir_local[sv2v_cast_4(i)])
0: recv_data__rdy[9 - 0] = ...;
1: recv_data__rdy[9 - 1] = ...;
2: recv_data__rdy[9 - 2] = ...;
// etc., up to the range of `in_dir_local[...]`
endcase
endOr, if it's inside a loop: genvar i;
generate
for (i = 0; i < N; i = i + 1) begin : gen_block
wire [3:0] idx = 9 - in_dir_local[i];
always @* begin
recv_data__rdy[idx] = ...;
end
end
endgenerateBut again, this depends on the tool's capabilities. Yosys cannot handle variable bit-selects or part-selects on the LHS — it only allows constant indices. RecommendationYou should convert the variable part-select into an indexed integer idx;
always @* begin
idx = 9 - in_dir_local[sv2v_cast_4(i)];
recv_data__rdy = ...; // default assignment
recv_data__rdy[idx] = ((send_data__rdy[11 - sv2v_cast_4(i)] & ~recv_blocked_vector[in_dir_local[sv2v_cast_4(i)]]) &
~recv_but_block_by_others[in_dir_local[sv2v_cast_4(i)]]) &
~send_but_block_by_others[sv2v_cast_4(i)];
endCheck whether this approach works in simulation and Yosys. If Yosys still rejects this due to indirect indexing, you'll have to fully unroll each possible case into a separate condition. Let me know if you want help writing the unrolled version for a specific width or range. |
Looks need manually change the verilog, but it should be generated from RTL right? |
|
Looks same kind of issue, but change to, thinking why it works before: |
|
Status for now - Dynamic Arrays issue, may need help from expert to change on RTL code:
Error: |
|
Hi @yuqisun, I actually cannot find the corresponding pymtl code for the error. Can you please try it on latest master, and let me know the corresponding pymtl code line, and the translated SVerilog code, and the corresponding Verilog code (after sv2v)? So we can debug this? |
|
Hi @tancheng , Tested with the latest VectorCGRA(bac978a6f30a4c4af368de15d6051cf1b74b9aeb), as per error message, pymtl code should be CrossbarRTL: Attach system verilog and verilog(sv2v), also sent you the zip of build and mflowgen for more details: Error message: |
Thanks @yuqisun, it is this part in pymtl: Corresponding SVerilog: Corresponding Verilog: |
|
Hi @yuqisun, can you change: to i.e., remove the |
I tried but got below exception: Tried changed to variable instead of list: Error: Changed to:
Looks good - generate SV good, synthesis backs to the same issue but in a new part - Corresponding v code (update_signal): |
|
Hi @yuqisun, I think you need to declare For the second error: |
|
Can you please share the updated/generated SVerilog and Verilog after you make the changes? |
|
Also, can you try w/o the changes, just replace |
Have a double check just now, it is |
Looks a scalar variable would be good? Let me try this solution on the other error first. |
|
Hi @tancheng , The dynamic array issue is good now, but synthesis took more than 6 hours and didn't finish yet, paste some of the warnings below, no error message. Should we optimize the RTLs further or just wait? |
What is the detailed configuration for this Verilog? Can you check whether you can see My point is can we have a tiny one to go through OpenRoad: Referring to: https://github.com/tancheng/VectorCGRA/blob/bac978a6f30a4c4af368de15d6051cf1b74b9aeb/cgra/test/CgraRTL_test.py#L626-L640 And these are too large. |
Hi @tancheng , There's no And Still slow in processing Verilog: |
|
Hi @yuqisun, what is the target timing/frequency? 100MHz takes such long time? Can we try 10MHz? Or even 1MHz? |
|
@yuqisun, I have no idea about why the two BTW, does |
This is
Yes. |
|
Thanks @yuqisun, let's just use this version for the CGRA-Flow/GUI update. And let's see how long it takes for place&route. |
- Change Docker image to cgra/cgraflow:v1 and update container name to mycgraflow in run_windows_docker.sh. - Correct import paths in mode_dark_light.py for consistency. - Add openroad_urls.txt with relevant download links for OpenROAD and related tools.
|
I ran with 20 cores machine again, the While ran with old code(20241028 image), no warnings: Attached logs:
Thanks, |
|
Hi @yuqisun, with @yo96's guidance, we suspect this part of code is the culprit: and Basically, we don't want lhs be written with an unknown (unknown at static time) index. Let's make it a static index, but manipulate the rhs part to align the functionality. Plz try to understand those codes, and let me know if you don't understand them. TODO:
|
|
Right, I suspect that this line is going to significantly increase the problem complexity for the SAT solver and exponentially increase the run time. The I think it might be difficult to solve this problem through refactoring the code itself. The fundamental cause is that what you want here is equivalent to an N-entry register file with N write ports, which is not scalable and blows up the SAT solver in Yosys. We should try to come up with a better design for this part of logic. |
|
You are right, after setting the LHS to a static idx, the synthesis process concluded quickly (approximately 5 minutes). I hardcoded idx to Log snippet: Full log: https://1drv.ms/u/c/a058f5f4a512f5b9/EVd6WeWQPvtFhczvGvGYEbEBHdi4PThF1r4tVzXM1xmdLw?e=k5bzFQ Issue raised: tancheng/VectorCGRA#148 |
Hi @yuqisun, a reminder for trying tancheng/VectorCGRA#155, thanks~! |
|
Hi @tancheng , This Dockerfile will:
Dockerfile is still running in my local for testing, will merge once verified. Thanks, |







Trying to add Dockerfile for CGRA-Flow.
Environment works but 3 issues here:
Building with current master code, looks there's bug in add progress bar to load UI component #62 to block CGRA rows/cols change. Should be fine as we are moving to multi-CGRA UI, but would be better if it's easy to push a fix. Hi @richardissuperman , could you have a try in your end to change rows/cols of CGRA with master code.
Didn't pass
cmdline_optsintotest_cgra_universal, pushed a fix.CGRA-Flow/mode_dark_light.py
Lines 967 to 970 in 82fd6e7
Issue when
clickSynthesize, @tancheng Have you ever seen this before, testing withfir.cpp, is it kernel error or code error?Attached design.name_mangled.v.txt
Would like to make the single CGRA UI work, then start multi-CGRA integration in case issue will make the integration complicated to identify the root cause.