Muhammad Usman
10/25/2021, 3:27 PMmodule sky130_fd_sc_hd__dfrtp (
Q ,
CLK ,
D ,
RESET_B,
VPWR ,
VGND ,
VPB ,
VNB
);
// Module ports
output Q ;
input CLK ;
input D ;
input RESET_B;
input VPWR ;
input VGND ;
input VPB ;
input VNB ;
// Local signals
wire buf_Q ;
wire RESET ;
reg notifier ;
wire D_delayed ;
wire RESET_B_delayed;
wire CLK_delayed ;
wire awake ;
wire cond0 ;
wire cond1 ;
// Name Output Other arguments
not not0 (RESET , RESET_B_delayed );
sky130_fd_sc_hd__udp_dff$PR_pp$PG$N dff0 (buf_Q , D_delayed, CLK_delayed, RESET, notifier, VPWR, VGND);
assign awake = ( VPWR === 1'b1 );
assign cond0 = ( awake && ( RESET_B_delayed === 1'b1 ) );
assign cond1 = ( awake && ( RESET_B === 1'b1 ) );
buf buf0 (Q , buf_Q );
endmodule
Here local clock and d (defined as CLK_delayed, and D_delayed) are defined but not assigned any values. And there are 10’s of flipflop cells and every cell has the same problem. I have no idea who should be notified for these mistakes. So, I am posting here so it may be floated to relevant person.Boris Murmann
10/25/2021, 5:25 PMBooshan
10/25/2021, 5:40 PM// Import user defined primitives.
`include "../../models/udp_dff_pr_pp_pg_n/sky130_fd_sc_hd__udp_dff_pr_pp_pg_n.v"
and
sky130_fd_sc_hd__udp_dff$PR_pp$PG$N dff0 (buf_Q , D_delayed, CLK_delayed, RESET, notifier, VPWR, VGND);
If you check this link (https://cs.opensource.google/skywater-pdk/sky130_fd_sc_hd/+/main:models/udp_dff_pr_pp_pg_n/sky130_fd_sc_hd__udp_dff_pr_pp_pg_n.v) to see the UDP, it has the functionality written. I don't think there are any errors in the pdk. Please correct me if I am wrong.Muhammad Usman
10/25/2021, 8:21 PMD_delayed, CLK_delayed
declared as wire
are input to the sky130_fd_sc_hd__udp_dff$PR_pp$PG$N
module, where D_delayed, CLK_delayed
have not assigned any value so they would be treated as X
.Tim Edwards
10/25/2021, 9:02 PM$setuphold
statements in the verilog. Because iverilog does not support these statements, they got scrubbed, but apparently the $setuphold
statement defines actual connections, such as between D
and D_delayed
. I expect it will take a lot of work to generate a patch for it, given that the skywater-pdk repository is in error, and the correct source files are not available.Muhammad Usman
10/25/2021, 9:07 PMBooshan
10/26/2021, 2:49 AMQ
has been assigned to the local signal buf_Q
but did not notice the issue with CLK_delayed
and D_delayed
.Alex Hodges
10/26/2021, 4:01 PM.lvs.powered.v
, that worked for me. I was trying to simulate the post yosys netlist, ending in .synthesis.v
, and had been failing with the same error as you.
You also need to define these macros in your top module:
``define UNIT_DELAY #1`
``define USE_POWER_PINS`
``define FUNCTIONAL`
After making those changes icarus happily simulated the netlist for me. I'm not crystal clear on what the differences in those two netlists are, but at least it works now.Tim Edwards
10/26/2021, 4:52 PMFUNCTIONAL
is the easiest way to avoid the problem. The functional verilog does not have timing values, or a way to specify them, but it can be used for gate-level simulation. If you are trying to do simulation with timing, there is a commented-out line in the open_pdks Makefile that will add back the specify sections. I have not checked if that fixes the above issue, but it might. iverilog will not simulate with that syntax, but you can use the "cvc" simulator (commercial open source), which will.Muhammad Usman
10/26/2021, 4:53 PM