Hello, I am trying to do an RTL sequential design....
# openlane
m
Hello, I am trying to do an RTL sequential design. It has a clock and I added it in config.json. It shows The Network is combinational error at 1st step while hardening user_proj_example. I would love to get suggestions about this. Note:The code worked fine in Vivado Xilinx simulation Here is the repo for the code and log files: https://github.com/MdOmarFaruque/HW_For_AI_V2
@Mitch Bailey @Tim Edwards @donn It would be great to get your suggestions in this regard
m
I looked at the rtl and the synthesized gl verilog, but it was a little to deep for me. Does the linter output give you any clues? https://github.com/MdOmarFaruque/HW_For_AI_V2/blob/main/user_proj_example/runs/24_08_11_19_29/reports/synthesis/1-synthesis.AREA_0.chk.rpt
Copy code
Checking module user_proj_example...
Warning: Wire user_proj_example.\intr is used but has no driver.
Warning: Wire user_proj_example.\digit [3] is used but has no driver.
Warning: Wire user_proj_example.\digit [2] is used but has no driver.
Warning: Wire user_proj_example.\digit [1] is used but has no driver.
Warning: Wire user_proj_example.\digit [0] is used but has no driver.
Found and reported 5 problems.
@Md Omar Faruque Don’t know if this is relevant, but this is what ChatGPT say for the following prompts.
Synthesizing the following rtl verilog says that intr is undriven. Can you figure out why?
(paste
user_proj_example.v
)
The reason why the signal
intr
is reported as undriven during synthesis is that the signal
out_valid
, which is assigned to
intr
, is not driven in every possible scenario in your design. Specifically, it is driven only by the
maxFinder
module, and there may be situations where this module does not assert
out_valid
due to the conditions within your design. Here’s a summary of possible causes: 1. Conditional Assignment: The
out_valid
signal may not be assigned in every possible condition within the
maxFinder
module or other related logic. If
out_valid
remains unassigned under certain conditions, it will default to an unknown (X) or high-impedance (Z) state, causing the
intr
signal to also be undriven. 2. Reset Logic: It’s possible that the
maxFinder
or upstream logic does not initialize or assign
out_valid
under a reset condition or when specific input conditions are not met. Troubleshooting Steps: • Check the
maxFinder
Module
: Inspect the
maxFinder
module to ensure that the
out_valid
signal is driven under all conditions, including reset and idle states. • Default Assignment: You can assign a default value to
out_valid
(e.g.,
out_valid = 0;
) before the main logic in the
maxFinder
or related modules. This ensures that
intr
will always have a valid value. • Ensure Continuous Assignment: Make sure
out_valid
is continuously assigned within an
always
block or combinatorial logic so that it’s not left floating. Implementing these steps should resolve the issue with
intr
being undriven.
Here’s the maxFinder module. Can you find a condition where out_valid is undriven?
(paste
maxFinder.v
)
The issue with the
maxFinder
module lies in the sequence of assignments within the
always
block. Specifically, the
o_data_valid
signal is being conditionally set to
1
when the
counter
equals
numInput
, but it is not explicitly assigned in all other cases. Here’s a step-by-step analysis: 1. Resetting
o_data_valid
: At the beginning of every clock cycle,
o_data_valid
is set to `0`: 2. verilog 3. 4. 5. o_data_valid <= 1'b0; 6. Condition when
i_valid
is high
: ◦ The block sets
maxValue
,
counter
,
inDataBuffer
, and
o_data
. However, it does not set
o_data_valid
. ◦ Therefore,
o_data_valid
remains
0
in this condition. 7. Condition when
counter == numInput
: ◦ The block sets
o_data_valid
to
1
and resets
counter
to
0
. This is the only condition where
o_data_valid
is explicitly set to
1
. ◦ This condition seems to work as expected. 8. Condition when
counter != 0
: ◦ The block increments
counter
and checks if the current value in
inDataBuffer
is greater than
maxValue
. ◦ Here,
o_data_valid
is not explicitly assigned, so it remains
0
. Potential Issue: The signal
o_data_valid
is only set to
1
under the condition
counter == numInput
. In all other conditions, it defaults to
0
because of the initial assignment at the start of the
always
block. However, if the logic ever skips the
counter == numInput
condition or if
i_valid
is not asserted,
o_data_valid
could remain
0
, leading to the
intr
signal being undriven in the higher-level module. Solution: To ensure that
o_data_valid
is properly driven, even in edge cases, you might consider initializing
o_data_valid
appropriately or reordering the logic:
Copy code
verilog


always @(posedge clk)
begin
    if(i_valid)
    begin
        maxValue <= i_data[inputWidth-1:0];
        counter <= 1;
        inDataBuffer <= i_data;
        o_data <= 0;
        o_data_valid <= 1'b0;  // Explicitly assign o_data_valid
    end
    else if(counter == numInput)
    begin
        counter <= 0;
        o_data_valid <= 1'b1;
    end
    else if(counter != 0)
    begin
        counter <= counter + 1;
        if(inDataBuffer[counter*inputWidth+:inputWidth] > maxValue)
        begin
            maxValue <= inDataBuffer[counter*inputWidth+:inputWidth];
            o_data <= counter;
        end
        o_data_valid <= 1'b0;  // Explicitly keep o_data_valid at 0
    end
end
This ensures that
o_data_valid
is always driven, either to
1
or
0
, depending on the condition.
m
Thank you for your suggestion. To address all conditions for intr,I modified the code including reset and all other r conditions. Besides,I saw that in terminal it was talking about not matching port size.I fixed the issue. Then it was saying Yosys checks failed in the terminal. However, in 1-synthesis.log file, the error was "network is combinational".Besides, despite covering all conditions, the warning regarding undriven intr and digit pins still remained the same. However, there was a warning regarding undriven axi_rd_en as well. I deleted that pin as it was not important. It passed the step 1 now.
👍 1
I just noticed that although the open lane flow was complete, the synthesis error (the network is combinational) was there. There were another 2 issues. 1 antenna violation,2 slew violations. It looks like these violations are for the synthesis error Here is the new repo link https://github.com/MdOmarFaruque/HW_V3
d
Please stop pinging me.
m
I am sorry,I thought you may have any idea to solve the issue I will remove it now.
m
I don’t know if it’s relevant, but the
config.json
file has
SYNTH_BUFFERING
set to zero. Maybe enabling buffering would fix the slew violations. Take a look at the layout and see if you can find out why the antenna violation occurred.
m
@Mitch BaileyThank you.However ,the network is combination error is still there.It completes the flow now though.Do you think slew violation has to do anything with it ?
m
I really don’t know. Slew violations are caused (I think) by weak signals driving large capacitance loads. Take a look at the layout and see if this is the case. This is generally fixed by buffering (I think). Setup and hold violations are referenced to a clock (I think).
👍 1