quartus projects

This commit is contained in:
Blaise Tine
2020-04-21 12:28:37 -07:00
parent 5798cf6e15
commit f53256f854
29 changed files with 75504 additions and 119 deletions

View File

@@ -12,9 +12,6 @@ module VX_byte_enabled_dual_port_ram (
output reg [`NUM_THREADS-1:0][31:0] q1,
output reg [`NUM_THREADS-1:0][31:0] q2
);
// integer regi;
// integer threadi;
// Thread Byte Bit
logic [`NUM_THREADS-1:0][3:0][7:0] ram[31:0];
@@ -23,29 +20,20 @@ module VX_byte_enabled_dual_port_ram (
//--
end else begin
if (we) begin
integer thread_ind;
for (thread_ind = 0; thread_ind < `NUM_THREADS; thread_ind = thread_ind + 1) begin
if (be[thread_ind]) begin
ram[waddr][thread_ind][0] <= wdata[thread_ind][7:0];
ram[waddr][thread_ind][1] <= wdata[thread_ind][15:8];
ram[waddr][thread_ind][2] <= wdata[thread_ind][23:16];
ram[waddr][thread_ind][3] <= wdata[thread_ind][31:24];
integer t;
for (t = 0; t < `NUM_THREADS; t = t + 1) begin
if (be[t]) begin
ram[waddr][t][0] <= wdata[t][7:0];
ram[waddr][t][1] <= wdata[t][15:8];
ram[waddr][t][2] <= wdata[t][23:16];
ram[waddr][t][3] <= wdata[t][31:24];
end
end
end
// $display("^^^^^^^^^^^^^^^^^^^^^^^");
// for (regi = 0; regi <= 31; regi = regi + 1) begin
// for (threadi = 0; threadi < `NUM_THREADS; threadi = threadi + 1) begin
// if (ram[regi][threadi] != 0) $display("$%d: %h",regi, ram[regi][threadi]);
// end
// end
end
end
assign q1 = ram[raddr1];
assign q2 = ram[raddr2];
// assign q1 = (raddr1 == waddr && (we)) ? wdata : ram[raddr1];
// assign q2 = (raddr2 == waddr && (we)) ? wdata : ram[raddr2];
endmodule