Mauricio Buendía
05/12/2024, 1:22 PMA[0:1]
• Outputs: Bus D[0:3]
• Each output is driven by an AND gate requiring specific combinations of inverted and non-inverted inputs.
Problem:
I'm having trouble when it comes to the two middle AND gates that need to select specific bits from both the inverted and non-inverted input buses. Although I've tried using bus_connect
and bus_tap
for this purpose, the resulting netlist doesn't reflect the intended connections, especially for the middle gates.
Current Netlist Output:
.subckt decoder_2_dev A[0],A[1] D[0],D[1],D[2],D[3] req_syn req
input_inv[0] A[0] VGND VNB VPB VPWR Ainv[0] sky130_fd_sc_hd__inv_1
input_inv[1] A[1] VGND VNB VPB VPWR Ainv[1] sky130_fd_sc_hd__inv_1
and_0 Ainv[0] Ainv[1] VGND VNB VPB VPWR D[0] sky130_fd_sc_hd__and2_0
and_1 A1[0] A1[1] VGND VNB VPB VPWR D[1] sky130_fd_sc_hd__and2_0
and_2 A2[0] A2[1] VGND VNB VPB VPWR D[2] sky130_fd_sc_hd__and2_0
and_3 A[0] A[1] VGND VNB VPB VPWR D[3] sky130_fd_sc_hd__and2_0
.ends
Desired Netlist Output:
.subckt decoder_2_dev A[0],A[1] D[0],D[1],D[2],D[3]
input_inv[0] A[0] VGND VNB VPB VPWR Ainv[0] sky130_fd_sc_hd__inv_1
input_inv[1] A[1] VGND VNB VPB VPWR Ainv[1] sky130_fd_sc_hd__inv_1
and_0 Ainv[0] Ainv[1] VGND VNB VPB VPWR D[0]
and_1 A[0] Ainv[1] VGND VNB VPB VPWR D[1]
and_2 Ainv[0] A[1] VGND VNB VPB VPWR D[2]
and_3 A[0] A[1] VGND VNB VPB VPWR D[3]
.ends
I have been looking for the way of doing this in the manual but I could not find a solution that works. How can I selectively combine signals from different buses into a new bus?
Thanks in advance!Mitch Bailey
05/12/2024, 1:41 PMX
. Spice format specifies that the first letter of a device instance name indicates the type.
For bus input, simply try comma separated names attached to the net - I don’t think you need intermediate A1[*]
or A2[*]
nets. Ainv[0],A[1]
and A[0],Ainv[1]
.Mauricio Buendía
05/12/2024, 4:03 PMStefan Schippers
05/14/2024, 8:17 AMX2[1:0]
do this. The AND gate is placed as a vectored instance X1[3:0]
and takes all combinations of A[1],AINV[1] and A[0], AINV[0]
. For the label syntax see https://xschem.sourceforge.io/stefan/xschem_man/tutorial_busses.htmlMauricio Buendía
05/14/2024, 11:22 AM