ammar_kurd
Junior Member level 3
Question about a mltuiplexer based bus.
Hello all,
If I want to make a bus for 32 registers in a register file each of 32 bits, if this bus is implemented as a multiplexer based bus is it going to be as seen in the picture? that is first, second how to implement in Verilog in a way that will not consume a lot of hardware? I have tried to make one but when synthesising I get fallowing error:
My Verilog code:
P.S. I didn't write the code by hand I used a bash script :-D otherwise it will be :bang:
Hello all,
If I want to make a bus for 32 registers in a register file each of 32 bits, if this bus is implemented as a multiplexer based bus is it going to be as seen in the picture? that is first, second how to implement in Verilog in a way that will not consume a lot of hardware? I have tried to make one but when synthesising I get fallowing error:
The design is too large to fit the device. Please check the Design Summary section to see which resource requirement for your design exceeds the resources available in the device. Note that the number of slices reported may not be reflected accurately as their packing might not have been completed.
My Verilog code:
Code:
module bus(
input [31:0] a0,
input [31:0] a1,
input [31:0] a2,
input [31:0] a3,
input [31:0] a4,
input [31:0] a5,
input [31:0] a6,
input [31:0] a7,
input [31:0] a8,
input [31:0] a9,
input [31:0] a10,
input [31:0] a11,
input [31:0] a12,
input [31:0] a13,
input [31:0] a14,
input [31:0] a15,
input [31:0] a16,
input [31:0] a17,
input [31:0] a18,
input [31:0] a19,
input [31:0] a20,
input [31:0] a21,
input [31:0] a22,
input [31:0] a23,
input [31:0] a24,
input [31:0] a25,
input [31:0] a26,
input [31:0] a27,
input [31:0] a28,
input [31:0] a29,
input [31:0] a30,
input [31:0] a31,
input [4:0] sel,
output reg [31:0] out
);
always @ (*)
begin
case (sel)
0: out = a0;
1: out = a1;
2: out = a2;
3: out = a3;
4: out = a4;
5: out = a5;
6: out = a6;
7: out = a7;
8: out = a8;
9: out = a9;
10: out = a10;
11: out = a11;
12: out = a12;
13: out = a13;
14: out = a14;
15: out = a15;
16: out = a16;
17: out = a17;
18: out = a18;
19: out = a19;
20: out = a20;
21: out = a21;
22: out = a22;
23: out = a23;
24: out = a24;
25: out = a25;
26: out = a26;
27: out = a27;
28: out = a28;
29: out = a29;
30: out = a30;
31: out = a31;
default: out = 0;
endcase
end
endmodule
P.S. I didn't write the code by hand I used a bash script :-D otherwise it will be :bang:
Last edited: