Status of the system implementation (up to 07/09/07)
module v_counters_7 (C, CLR, Q); input C, CLR; output signed [3:0] Q; // problemic coding reg signed [3:0] tmp; // problemic coding ... endmodule
// // 4-bit Unsigned Up Counter with Asynchronous Clear and Clock Enable // module v_counters_5 (C, CLR, CE, Q); input C, CLR, CE; output [3:0] Q; reg [3:0] tmp; always @(posedge C or posedge CLR) begin if (CLR) tmp <= 4'b0000; else if (CE) tmp <= tmp + 1'b1; end assign Q = tmp; endmodule
Synthesized counters_5.v
// // 4-bit Latch with Inverted Gate and Asynchronous Preset // module v_latches_3 (G, D, PRE, Q); input G, PRE; input [3:0] D; output [3:0] Q; reg [3:0] Q; always @(G or D or PRE) begin if (PRE) Q = 4'b1111; else if (~G) Q = D; end endmodule
Synthesized latches_3.v
// // Unsigned 8-bit Greater or Equal Comparator // module v_comparator_1 (A, B, CMP); input [7:0] A; input [7:0] B; output CMP; assign CMP = (A >= B) ? 1'b1 : 1'b0; endmodule
Synthesized comparators_1.v
// // 4-to-1 1-bit MUX using tristate buffers. // module v_multiplexers_3 (a, b, c, d, s, o); input a,b,c,d; input [3:0] s; output o; assign o = s[3] ? a :1'bz; assign o = s[2] ? b :1'bz; assign o = s[1] ? c :1'bz; assign o = s[0] ? d :1'bz; endmodule
+ The "if-else if-else if-else" sequence should have be inferred as a MUX. [multiplexers_1.v]
// // 4-to-1 1-bit MUX using an If statement. // module v_multiplexers_1 (a, b, c, d, s, o); input a,b,c,d; input [1:0] s; output o; reg o; always @(a or b or c or d or s) begin if (s == 2'b00) o = a; else if (s == 2'b01) o = b; else if (s == 2'b10) o = c; else o = d; end endmodule
Synthesized (by BruinSyn) multiplexers_1.v
// // 3-to-1 1-bit MUX with a 1-bit latch. // module v_multiplexers_4 (a, b, c, s, o); input a,b,c; input [1:0] s; output o; reg o; always @(a or b or c or s) begin if (s == 2'b00) o = a; else if (s == 2'b01) o = b; else if (s == 2'b10) o = c; end endmodule
Synthesized (by BruinSyn) multiplexers_4.v
Synthesized (by Quartus 7.1) multiplexers_4.v