Hi. I was doing some experiments with yosys and netlistsvg to render a logic schematic from Verilog.
I want to keep the buffers in the schematic, I’m using insbuf (is it the right approach?) and I came across this issue:
// type: sdfrbp
`timescale 1ns/10ps
`celldefine
module sg13g2_sdfrbp_2 (Q, Q_N, D, SCD, SCE, RESET_B, CLK);
output Q, Q_N;
input D, SCD, SCE, RESET_B, CLK;
// Function
wire int_fwire_d, int_fwire_IQ, int_fwire_IQN;
wire int_fwire_r, xcr_0;
ihp_mux2 udp_ihp_mux2(int_fwire_d, D, SCD, SCE);
not (int_fwire_r, RESET_B);
ihp_dff_r_err udp_ihp_dff_r_err(xcr_0, CLK, int_fwire_d, int_fwire_r);
ihp_dff_r udp_ihp_dff_r(int_fwire_IQ, CLK, int_fwire_d, int_fwire_r, xcr_0);
not (int_fwire_IQN, int_fwire_IQ);
buf (Q, int_fwire_IQ);
buf (Q_N, int_fwire_IQN);
endmodule
`endcelldefine
read_verilog sg13g2_sdfrbp_2_functional.v
read_verilog -lib primitives_blackbox.v
hierarchy
prep -top sg13g2_sdfrbp_2
insbuf
write_json sg13g2_sdfrbp_2_functional.json
netlistsvg sg13g2_sdfrbp_2_functional.json -o sg13g2_sdfrbp_2_functional.svg
Whenever there is a NOT gate before a buffer and an output, the buffer output is left floating. It can be fixed in the json netlist.
A minimal example:
module buftest(
input A,
output Z, Z_N);
wire int_a;
buf buf1(Z, A);
not not1(int_a, A);
buf buf2(Z_N, int_a);
endmodule
read_verilog buftest.v
prep -top buftest
insbuf
write_json buftest.json
Posting here because I’m not sure if I’m using insbuf correctly, so it might be an user issue. Thanks in advance.