/usr/share/tkgate/primitives/decoder.v is in tkgate-data 2.0~b10-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | module decoder #(.Dez(1), .Diz(1)) (I, E, $${NUMOUT:, :Z%});
input ${I_RANGE} I;
input E;
output $${NUMOUT:, :Z%};
wire ${OUT_RANGE} Zcat;
specify
$${NUMOUT:\n: (E *> Z%) = Dez; }
$${NUMOUT:\n: (I *> Z%) = Diz; }
endspecify
assign Zcat = ${invZ} ({${NUMOUT}{E}} & (${NUMOUT}'b1 << I));
$${NUMOUT:\n: assign Z% = Zcat[%];}
endmodule // decoder
|