OpenCores
URL https://opencores.org/ocsvn/minsoc/minsoc/trunk

Subversion Repositories minsoc

[/] [minsoc/] [branches/] [verilator/] [bench/] [verilog/] [minsoc_bench_core.v] - Blame information for rev 17

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 rfajardo
`include "minsoc_bench_defines.v"
2
`include "minsoc_defines.v"
3 10 rfajardo
`include "or1200_defines.v"
4 2 rfajardo
 
5
module minsoc_bench();
6
 
7
reg clock, reset;
8
 
9 17 rfajardo
//Debug interface
10 2 rfajardo
wire dbg_tms_i;
11
wire dbg_tck_i;
12
wire dbg_tdi_i;
13
wire dbg_tdo_o;
14
wire jtag_vref;
15
wire jtag_gnd;
16
 
17 17 rfajardo
//SPI wires
18 2 rfajardo
wire spi_mosi;
19
reg spi_miso;
20
wire spi_sclk;
21
wire [1:0] spi_ss;
22
 
23 17 rfajardo
//UART wires
24 2 rfajardo
wire uart_stx;
25 9 rfajardo
reg uart_srx;
26 2 rfajardo
 
27 17 rfajardo
//ETH wires
28
reg eth_col;
29
reg eth_crs;
30 2 rfajardo
wire eth_trst;
31 17 rfajardo
reg eth_tx_clk;
32 2 rfajardo
wire eth_tx_en;
33
wire eth_tx_er;
34
wire [3:0] eth_txd;
35 17 rfajardo
reg eth_rx_clk;
36
reg eth_rx_dv;
37
reg eth_rx_er;
38
reg [3:0] eth_rxd;
39
reg eth_fds_mdint;
40 2 rfajardo
wire eth_mdc;
41
wire eth_mdio;
42
 
43
//
44
//      TASKS registers to communicate with interfaces
45
//
46 17 rfajardo
`ifdef ETHERNET
47
reg [7:0] eth_rx_data [0:1535];            //receive buffer ETH (max packet 1536)
48
reg [7:0] eth_tx_data [0:1535];     //send buffer ETH (max packet 1536)
49
localparam ETH_HDR = 14;
50
localparam ETH_PAYLOAD_MAX_LENGTH = 1518;//only able to send up to 1536 bytes with header (14 bytes) and CRC (4 bytes)
51
`endif
52 2 rfajardo
 
53
 
54
//
55
// Testbench mechanics
56
//
57 4 rfajardo
reg [7:0] program_mem[(1<<(`MEMORY_ADR_WIDTH+2))-1:0];
58 2 rfajardo
integer initialize, final, ptr;
59
reg [8*64:0] file_name;
60
reg load_file;
61 8 rfajardo
 
62 2 rfajardo
initial begin
63 8 rfajardo
    reset = 1'b0;
64
    clock = 1'b0;
65 17 rfajardo
 
66 11 rfajardo
    uart_srx = 1'b1;
67 17 rfajardo
 
68
        eth_col = 1'b0;
69
        eth_crs = 1'b0;
70
        eth_fds_mdint = 1'b1;
71
        eth_rx_er = 1'b0;
72
 
73
        eth_tx_clk = 1'b0;
74
        eth_rx_clk = 1'b0;
75
        eth_rxd = 4'h0;
76
        eth_rx_dv = 1'b0;
77
 
78 8 rfajardo
 
79 17 rfajardo
//dual and two port rams from FPGA memory instances have to be initialized to 0
80 10 rfajardo
    init_fpga_memory();
81
 
82 2 rfajardo
        load_file = 1'b0;
83
`ifdef INITIALIZE_MEMORY_MODEL
84
        load_file = 1'b1;
85
`endif
86
`ifdef START_UP
87
        load_file = 1'b1;
88
`endif
89 8 rfajardo
 
90 2 rfajardo
        //get firmware hex file from command line input
91
        if ( load_file ) begin
92
                if ( ! $value$plusargs("file_name=%s", file_name) || file_name == 0 ) begin
93
                        $display("ERROR: please specify an input file to start.");
94
                        $finish;
95
                end
96
                $readmemh(file_name, program_mem);
97
                // First word comprehends size of program
98
                final = { program_mem[0] , program_mem[1] , program_mem[2] , program_mem[3] };
99
        end
100
 
101
`ifdef INITIALIZE_MEMORY_MODEL
102
        // Initialize memory with firmware
103
        initialize = 0;
104
        while ( initialize < final ) begin
105
                minsoc_top_0.onchip_ram_top.block_ram_3.mem[initialize/4] = program_mem[initialize];
106
                minsoc_top_0.onchip_ram_top.block_ram_2.mem[initialize/4] = program_mem[initialize+1];
107
                minsoc_top_0.onchip_ram_top.block_ram_1.mem[initialize/4] = program_mem[initialize+2];
108
                minsoc_top_0.onchip_ram_top.block_ram_0.mem[initialize/4] = program_mem[initialize+3];
109
        initialize = initialize + 4;
110
        end
111
        $display("Memory model initialized with firmware:");
112
        $display("%s", file_name);
113
        $display("%d Bytes loaded from %d ...", initialize , final);
114
`endif
115
 
116
    // Reset controller
117
    repeat (2) @ (negedge clock);
118
    reset = 1'b1;
119
    repeat (16) @ (negedge clock);
120
    reset = 1'b0;
121
 
122
`ifdef START_UP
123
        // Pass firmware over spi to or1k_startup
124
        ptr = 0;
125
        //read dummy
126
        send_spi(program_mem[ptr]);
127
        send_spi(program_mem[ptr]);
128
        send_spi(program_mem[ptr]);
129
        send_spi(program_mem[ptr]);
130
        //~read dummy
131
        while ( ptr < final ) begin
132
                send_spi(program_mem[ptr]);
133
                ptr = ptr + 1;
134
        end
135
        $display("Memory start-up completed...");
136
        $display("Loaded firmware:");
137
        $display("%s", file_name);
138
`endif
139 17 rfajardo
 
140
 
141 2 rfajardo
        //
142
    // Testbench START
143
        //
144 17 rfajardo
 
145
    fork
146
        begin
147
`ifdef ETHERNET
148
            get_mac();
149
 
150
            if ( { eth_rx_data[ETH_HDR] , eth_rx_data[ETH_HDR+1] , eth_rx_data[ETH_HDR+2] , eth_rx_data[ETH_HDR+3] } == 32'hFF2B4050 )
151
                $display("eth-nocache firmware started.");
152
`endif
153
        end
154
        begin
155
                #2000000;
156
`ifdef UART
157
            uart_send(8'h41);       //Character A
158
`endif
159
`ifdef ETHERNET
160
                eth_tx_data[ETH_HDR+0] = 8'hBA;
161
                eth_tx_data[ETH_HDR+1] = 8'h87;
162
                eth_tx_data[ETH_HDR+2] = 8'hAA;
163
                eth_tx_data[ETH_HDR+3] = 8'hBB;
164
                eth_tx_data[ETH_HDR+4] = 8'hCC;
165
                eth_tx_data[ETH_HDR+5] = 8'hDD;
166 2 rfajardo
 
167 17 rfajardo
                send_mac(6);
168
`endif
169
        end
170
    join
171 2 rfajardo
 
172
end
173
 
174
 
175
//
176
// Modules instantiations
177
//
178
minsoc_top minsoc_top_0(
179
   .clk(clock),
180
   .reset(reset)
181
 
182
   //JTAG ports
183
`ifdef GENERIC_TAP
184
   , .jtag_tdi(dbg_tdi_i),
185
   .jtag_tms(dbg_tms_i),
186
   .jtag_tck(dbg_tck_i),
187
   .jtag_tdo(dbg_tdo_o),
188
   .jtag_vref(jtag_vref),
189
   .jtag_gnd(jtag_gnd)
190
`endif
191
 
192
   //SPI ports
193
`ifdef START_UP
194
   , .spi_flash_mosi(spi_mosi),
195
   .spi_flash_miso(spi_miso),
196
   .spi_flash_sclk(spi_sclk),
197
   .spi_flash_ss(spi_ss)
198
`endif
199
 
200
   //UART ports
201
`ifdef UART
202
   , .uart_stx(uart_stx),
203
   .uart_srx(uart_srx)
204
`endif // !UART
205
 
206
        // Ethernet ports
207
`ifdef ETHERNET
208
        , .eth_col(eth_col),
209
    .eth_crs(eth_crs),
210
    .eth_trste(eth_trst),
211
    .eth_tx_clk(eth_tx_clk),
212
        .eth_tx_en(eth_tx_en),
213
    .eth_tx_er(eth_tx_er),
214
    .eth_txd(eth_txd),
215
    .eth_rx_clk(eth_rx_clk),
216
        .eth_rx_dv(eth_rx_dv),
217
    .eth_rx_er(eth_rx_er),
218
    .eth_rxd(eth_rxd),
219
    .eth_fds_mdint(eth_fds_mdint),
220
        .eth_mdc(eth_mdc),
221
    .eth_mdio(eth_mdio)
222
`endif // !ETHERNET
223
);
224
 
225
`ifdef VPI_DEBUG
226
        dbg_comm_vpi dbg_if(
227
                .SYS_CLK(clock),
228
                .P_TMS(dbg_tms_i),
229
                .P_TCK(dbg_tck_i),
230
                .P_TRST(),
231
                .P_TDI(dbg_tdi_i),
232
                .P_TDO(dbg_tdo_o)
233
        );
234
`else
235
   assign dbg_tdi_i = 1;
236
   assign dbg_tck_i = 0;
237
   assign dbg_tms_i = 1;
238
`endif
239
 
240
 
241
//
242 8 rfajardo
//      Regular clocking and output
243 2 rfajardo
//
244
always begin
245
    #((`CLK_PERIOD)/2) clock <= ~clock;
246
end
247
 
248
`ifdef VCD_OUTPUT
249
initial begin
250
        $dumpfile("../results/minsoc_wave.vcd");
251
        $dumpvars();
252
end
253
`endif
254
 
255
 
256
//
257
//      Functionalities tasks: SPI Startup and UART Monitor
258
//
259
//SPI START_UP
260
`ifdef START_UP
261
task send_spi;
262
    input [7:0] data_in;
263
    integer i;
264
    begin
265
        i = 7;
266
        for ( i = 7 ; i >= 0; i = i - 1 ) begin
267
                spi_miso = data_in[i];
268
                        @ (posedge spi_sclk);
269
            end
270
    end
271
endtask
272
`endif
273
//~SPI START_UP
274
 
275 17 rfajardo
//UART
276 2 rfajardo
`ifdef UART
277 17 rfajardo
localparam UART_TX_WAIT = (`FREQ / `UART_BAUDRATE) * `CLK_PERIOD;
278 2 rfajardo
 
279 17 rfajardo
task uart_send;
280
    input [7:0] data;
281
    integer i;
282
    begin
283
        uart_srx = 1'b0;
284
            #UART_TX_WAIT;
285
        for ( i = 0; i < 8 ; i = i + 1 ) begin
286
                    uart_srx = data[i];
287
                    #UART_TX_WAIT;
288
            end
289
        uart_srx = 1'b0;
290
            #UART_TX_WAIT;
291
            uart_srx = 1'b1;
292
    end
293
endtask
294
 
295
//UART Monitor (prints uart output on the terminal)
296 2 rfajardo
// Something to trigger the task
297
always @(posedge clock)
298
        uart_decoder;
299
 
300
task uart_decoder;
301
        integer i;
302
        reg [7:0] tx_byte;
303
        begin
304
 
305
        // Wait for start bit
306
        while (uart_stx == 1'b1)
307
                @(uart_stx);
308
 
309
        #(UART_TX_WAIT+(UART_TX_WAIT/2));
310
 
311
    for ( i = 0; i < 8 ; i = i + 1 ) begin
312
                tx_byte[i] = uart_stx;
313
                #UART_TX_WAIT;
314
        end
315
 
316
        //Check for stop bit
317
        if (uart_stx == 1'b0) begin
318
                  //$display("* WARNING: user stop bit not received when expected at time %d__", $time);
319
          // Wait for return to idle
320
                while (uart_stx == 1'b0)
321
                        @(uart_stx);
322
          //$display("* USER UART returned to idle at time %d",$time);
323
        end
324
        // display the char
325
        $write("%c", tx_byte);
326
        end
327
endtask
328 17 rfajardo
//~UART Monitor
329 2 rfajardo
`endif // !UART
330 17 rfajardo
//~UART
331 2 rfajardo
 
332
 
333
//
334
//      TASKS to communicate with interfaces
335
//
336
//MAC_DATA
337
//
338
`ifdef ETHERNET
339 17 rfajardo
reg [31:0] crc32_result;
340 2 rfajardo
 
341
task get_mac;
342
    integer conta;
343
    reg LSB;
344
    begin
345
        conta = 0;
346
        LSB = 1;
347 17 rfajardo
        @ ( posedge eth_tx_en);
348
 
349
        repeat (16) @ (negedge eth_tx_clk);  //8 bytes, preamble (7 bytes) + start of frame (1 byte)
350
 
351 2 rfajardo
        while ( eth_tx_en == 1'b1 ) begin
352
            @ (negedge eth_tx_clk) begin
353
                if ( LSB == 1'b1 )
354 17 rfajardo
                    eth_rx_data[conta][3:0] = eth_txd;
355 2 rfajardo
                else begin
356 17 rfajardo
                    eth_rx_data[conta][7:4] = eth_txd;
357 2 rfajardo
                    conta = conta + 1;
358
                end
359
                LSB = ~LSB;
360
            end
361
        end
362
    end
363
endtask
364
 
365 17 rfajardo
task send_mac;              //only able to send up to 1536 bytes with header (14 bytes) and CRC (4 bytes)
366
    input [31:0] length;    //ETH_PAYLOAD_MAX_LENGTH 1518
367 2 rfajardo
    integer conta;
368 17 rfajardo
    begin
369
        if ( length <= ETH_PAYLOAD_MAX_LENGTH ) begin
370
            //DEST MAC
371
            eth_tx_data[0] = 8'h55;
372
            eth_tx_data[1] = 8'h47;
373
            eth_tx_data[2] = 8'h34;
374
            eth_tx_data[3] = 8'h22;
375
            eth_tx_data[4] = 8'h88;
376
            eth_tx_data[5] = 8'h92;
377 2 rfajardo
 
378 17 rfajardo
            //SOURCE MAC
379
            eth_tx_data[6] = 8'h3D;
380
            eth_tx_data[7] = 8'h4F;
381
            eth_tx_data[8] = 8'h1A;
382
            eth_tx_data[9] = 8'hBE;
383
            eth_tx_data[10] = 8'h68;
384
            eth_tx_data[11] = 8'h72;
385 2 rfajardo
 
386 17 rfajardo
            //LEN
387
            eth_tx_data[12] = length[7:4];
388
            eth_tx_data[13] = length[3:0];
389 2 rfajardo
 
390 17 rfajardo
            //DATA input by task caller
391 2 rfajardo
 
392 17 rfajardo
            //PAD
393
            for ( conta = length+14; conta < 60; conta = conta + 1 ) begin
394
                eth_tx_data[conta] = 8'h00;
395
            end
396 2 rfajardo
 
397 17 rfajardo
            gencrc32(conta);
398 2 rfajardo
 
399 17 rfajardo
            eth_tx_data[conta] = crc32_result[31:24];
400
            eth_tx_data[conta+1] = crc32_result[23:16];
401
            eth_tx_data[conta+2] = crc32_result[15:8];
402
            eth_tx_data[conta+3] = crc32_result[7:0];
403 2 rfajardo
 
404 17 rfajardo
            send_rx_packet( 64'h0055_5555_5555_5555, 4'h7, 8'hD5, 32'h0000_0000, conta+4, 1'b0 );
405
        end
406
        else
407
            $display("Warning: Ethernet packet is to big to be sent.");
408 2 rfajardo
    end
409
 
410
endtask
411 17 rfajardo
 
412
task send_rx_packet;
413
  input  [(8*8)-1:0] preamble_data; // preamble data to be sent - correct is 64'h0055_5555_5555_5555
414
  input   [3:0] preamble_len; // length of preamble in bytes - max is 4'h8, correct is 4'h7 
415
  input   [7:0] sfd_data; // SFD data to be sent - correct is 8'hD5
416
  input  [31:0] start_addr; // start address
417
  input  [31:0] len; // length of frame in Bytes (without preamble and SFD)
418
  input         plus_drible_nibble; // if length is longer for one nibble
419
  integer       rx_cnt;
420
  reg    [31:0] eth_tx_data_addr_in; // address for reading from RX memory       
421
  reg     [7:0] eth_tx_data_data_out; // data for reading from RX memory
422
begin
423
      @(posedge eth_rx_clk);
424
      #1 eth_rx_dv = 1;
425
 
426
      // set initial rx memory address
427
      eth_tx_data_addr_in = start_addr;
428
 
429
      // send preamble
430
      for (rx_cnt = 0; (rx_cnt < (preamble_len << 1)) && (rx_cnt < 16); rx_cnt = rx_cnt + 1)
431
      begin
432
        #1 eth_rxd = preamble_data[3:0];
433
        #1 preamble_data = preamble_data >> 4;
434
        @(posedge eth_rx_clk);
435
      end
436
 
437
      // send SFD
438
      for (rx_cnt = 0; rx_cnt < 2; rx_cnt = rx_cnt + 1)
439
      begin
440
        #1 eth_rxd = sfd_data[3:0];
441
        #1 sfd_data = sfd_data >> 4;
442
        @(posedge eth_rx_clk);
443
      end
444
 
445
      // send packet's addresses, type/length, data and FCS
446
      for (rx_cnt = 0; rx_cnt < len; rx_cnt = rx_cnt + 1)
447
      begin
448
        #1;
449
        eth_tx_data_data_out = eth_tx_data[eth_tx_data_addr_in[21:0]];
450
        eth_rxd = eth_tx_data_data_out[3:0];
451
        @(posedge eth_rx_clk);
452
        #1;
453
        eth_rxd = eth_tx_data_data_out[7:4];
454
        eth_tx_data_addr_in = eth_tx_data_addr_in + 1;
455
        @(posedge eth_rx_clk);
456
        #1;
457
      end
458
      if (plus_drible_nibble)
459
      begin
460
        eth_tx_data_data_out = eth_tx_data[eth_tx_data_addr_in[21:0]];
461
        eth_rxd = eth_tx_data_data_out[3:0];
462
        @(posedge eth_rx_clk);
463
      end
464
 
465
      #1 eth_rx_dv = 0;
466
      @(posedge eth_rx_clk);
467
 
468
end
469
endtask // send_rx_packet
470 2 rfajardo
 
471
//CRC32
472 17 rfajardo
localparam [31:0] CRC32_POLY = 32'h04C11DB7;
473 2 rfajardo
 
474 17 rfajardo
task gencrc32;
475
    input [31:0] crc32_length;
476
 
477 2 rfajardo
    integer     byte, bit;
478
    reg         msb;
479
    reg [7:0]    current_byte;
480
    reg [31:0]   temp;
481
 
482
    begin
483
        crc32_result = 32'hffffffff;
484
        for (byte = 0; byte < crc32_length; byte = byte + 1) begin
485 17 rfajardo
            current_byte = eth_tx_data[byte];
486 2 rfajardo
            for (bit = 0; bit < 8; bit = bit + 1) begin
487
                msb = crc32_result[31];
488
                crc32_result = crc32_result << 1;
489
                if (msb != current_byte[bit]) begin
490
                    crc32_result = crc32_result ^ CRC32_POLY;
491
                    crc32_result[0] = 1;
492
                end
493
            end
494
        end
495
 
496
        // Last step is to "mirror" every bit, swap the 4 bytes, and then complement each bit.
497
        //
498
        // Mirror:
499
        for (bit = 0; bit < 32; bit = bit + 1)
500
            temp[31-bit] = crc32_result[bit];
501
 
502
        // Swap and Complement:
503
        crc32_result = ~{temp[7:0], temp[15:8], temp[23:16], temp[31:24]};
504
    end
505
endtask
506 17 rfajardo
//~CRC32
507
 
508
//Generate tx and rx clocks
509
always begin
510
        #((`ETH_PHY_PERIOD)/2) eth_tx_clk <= ~eth_tx_clk;
511
end
512
always begin
513
        #((`ETH_PHY_PERIOD)/2) eth_rx_clk <= ~eth_rx_clk;
514
end
515
//~Generate tx and rx clocks
516
 
517 2 rfajardo
`endif // !ETHERNET
518
//~MAC_DATA
519
 
520
 
521 10 rfajardo
 
522
//
523
// TASK to initialize instantiated FPGA dual and two port memory to 0
524
//
525
task init_fpga_memory;
526
    integer i;
527
    begin
528
`ifdef OR1200_RFRAM_TWOPORT
529
`ifdef OR1200_XILINX_RAMB4
530
    for ( i = 0; i < (1<<8); i = i + 1 ) begin
531
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.ramb4_s16_s16_0.mem[i] = 16'h0000;
532
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.ramb4_s16_s16_1.mem[i] = 16'h0000;
533
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.ramb4_s16_s16_0.mem[i] = 16'h0000;
534
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.ramb4_s16_s16_1.mem[i] = 16'h0000;
535
    end
536
`elsif OR1200_XILINX_RAMB16
537
    for ( i = 0; i < (1<<9); i = i + 1 ) begin
538
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.ramb16_s36_s36.mem[i] = 32'h0000_0000;
539
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.ramb16_s36_s36.mem[i] = 32'h0000_0000;
540
    end
541
`elsif OR1200_ALTERA_LPM
542
`ifndef OR1200_ALTERA_LPM_XXX
543
    $display("Definition OR1200_ALTERA_LPM in or1200_defines.v does not enable ALTERA memory for neither DUAL nor TWO port RFRAM");
544
    $display("It uses GENERIC memory instead.");
545
    $display("Add '`define OR1200_ALTERA_LPM_XXX' under '`define OR1200_ALTERA_LPM' on or1200_defines.v to use ALTERA memory.");
546
`endif
547
`ifdef OR1200_ALTERA_LPM_XXX
548
    $display("...Using ALTERA memory for TWOPORT RFRAM!");
549
    for ( i = 0; i < (1<<5); i = i + 1 ) begin
550
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.altqpram_component.mem[i] = 32'h0000_0000;
551
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.altqpram_component.mem[i] = 32'h0000_0000;
552
    end
553
`else
554
    $display("...Using GENERIC memory!");
555
    for ( i = 0; i < (1<<5); i = i + 1 ) begin
556
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.mem[i] = 32'h0000_0000;
557
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.mem[i] = 32'h0000_0000;
558
    end
559
`endif
560
`elsif OR1200_XILINX_RAM32X1D
561
    $display("Definition OR1200_XILINX_RAM32X1D in or1200_defines.v does not enable FPGA memory for TWO port RFRAM");
562
    $display("It uses GENERIC memory instead.");
563
    $display("FPGA memory can be used if you choose OR1200_RFRAM_DUALPORT");
564
    for ( i = 0; i < (1<<5); i = i + 1 ) begin
565
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.mem[i] = 32'h0000_0000;
566
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.mem[i] = 32'h0000_0000;
567
    end
568
`else
569
    for ( i = 0; i < (1<<5); i = i + 1 ) begin
570
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.mem[i] = 32'h0000_0000;
571
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.mem[i] = 32'h0000_0000;
572
    end
573
`endif
574
`elsif OR1200_RFRAM_DUALPORT
575
`ifdef OR1200_XILINX_RAMB4
576
    for ( i = 0; i < (1<<8); i = i + 1 ) begin
577
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.ramb4_s16_0.mem[i] = 16'h0000;
578
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.ramb4_s16_1.mem[i] = 16'h0000;
579
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.ramb4_s16_0.mem[i] = 16'h0000;
580
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.ramb4_s16_1.mem[i] = 16'h0000;
581
    end
582
`elsif OR1200_XILINX_RAMB16
583
    for ( i = 0; i < (1<<9); i = i + 1 ) begin
584
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.ramb16_s36_s36.mem[i] = 32'h0000_0000;
585
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.ramb16_s36_s36.mem[i] = 32'h0000_0000;
586
    end
587
`elsif OR1200_ALTERA_LPM
588
`ifndef OR1200_ALTERA_LPM_XXX
589
    $display("Definition OR1200_ALTERA_LPM in or1200_defines.v does not enable ALTERA memory for neither DUAL nor TWO port RFRAM");
590
    $display("It uses GENERIC memory instead.");
591
    $display("Add '`define OR1200_ALTERA_LPM_XXX' under '`define OR1200_ALTERA_LPM' on or1200_defines.v to use ALTERA memory.");
592
`endif
593
`ifdef OR1200_ALTERA_LPM_XXX
594
    $display("...Using ALTERA memory for DUALPORT RFRAM!");
595
    for ( i = 0; i < (1<<5); i = i + 1 ) begin
596
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.altqpram_component.mem[i] = 32'h0000_0000;
597
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.altqpram_component.mem[i] = 32'h0000_0000;
598
    end
599
`else
600
    $display("...Using GENERIC memory!");
601
    for ( i = 0; i < (1<<5); i = i + 1 ) begin
602
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.mem[i] = 32'h0000_0000;
603
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.mem[i] = 32'h0000_0000;
604
    end
605
`endif
606
`elsif OR1200_XILINX_RAM32X1D
607
`ifdef OR1200_USE_RAM16X1D_FOR_RAM32X1D
608
    for ( i = 0; i < (1<<4); i = i + 1 ) begin
609
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_0_0.mem[i] = 1'b0;
610
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_0_1.mem[i] = 1'b0;
611
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_0_2.mem[i] = 1'b0;
612
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_0_3.mem[i] = 1'b0;
613
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_0_4.mem[i] = 1'b0;
614
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_0_5.mem[i] = 1'b0;
615
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_0_6.mem[i] = 1'b0;
616
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_0_7.mem[i] = 1'b0;
617
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_1_0.mem[i] = 1'b0;
618
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_1_1.mem[i] = 1'b0;
619
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_1_2.mem[i] = 1'b0;
620
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_1_3.mem[i] = 1'b0;
621
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_1_4.mem[i] = 1'b0;
622
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_1_5.mem[i] = 1'b0;
623
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_1_6.mem[i] = 1'b0;
624
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_1_7.mem[i] = 1'b0;
625
 
626
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_0_0.mem[i] = 1'b0;
627
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_0_1.mem[i] = 1'b0;
628
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_0_2.mem[i] = 1'b0;
629
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_0_3.mem[i] = 1'b0;
630
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_0_4.mem[i] = 1'b0;
631
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_0_5.mem[i] = 1'b0;
632
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_0_6.mem[i] = 1'b0;
633
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_0_7.mem[i] = 1'b0;
634
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_1_0.mem[i] = 1'b0;
635
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_1_1.mem[i] = 1'b0;
636
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_1_2.mem[i] = 1'b0;
637
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_1_3.mem[i] = 1'b0;
638
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_1_4.mem[i] = 1'b0;
639
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_1_5.mem[i] = 1'b0;
640
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_1_6.mem[i] = 1'b0;
641
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_1_7.mem[i] = 1'b0;
642
 
643
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_0_0.mem[i] = 1'b0;
644
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_0_1.mem[i] = 1'b0;
645
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_0_2.mem[i] = 1'b0;
646
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_0_3.mem[i] = 1'b0;
647
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_0_4.mem[i] = 1'b0;
648
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_0_5.mem[i] = 1'b0;
649
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_0_6.mem[i] = 1'b0;
650
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_0_7.mem[i] = 1'b0;
651
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_1_0.mem[i] = 1'b0;
652
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_1_1.mem[i] = 1'b0;
653
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_1_2.mem[i] = 1'b0;
654
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_1_3.mem[i] = 1'b0;
655
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_1_4.mem[i] = 1'b0;
656
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_1_5.mem[i] = 1'b0;
657
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_1_6.mem[i] = 1'b0;
658
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_1_7.mem[i] = 1'b0;
659
 
660
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_0_0.mem[i] = 1'b0;
661
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_0_1.mem[i] = 1'b0;
662
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_0_2.mem[i] = 1'b0;
663
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_0_3.mem[i] = 1'b0;
664
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_0_4.mem[i] = 1'b0;
665
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_0_5.mem[i] = 1'b0;
666
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_0_6.mem[i] = 1'b0;
667
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_0_7.mem[i] = 1'b0;
668
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_1_0.mem[i] = 1'b0;
669
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_1_1.mem[i] = 1'b0;
670
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_1_2.mem[i] = 1'b0;
671
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_1_3.mem[i] = 1'b0;
672
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_1_4.mem[i] = 1'b0;
673
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_1_5.mem[i] = 1'b0;
674
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_1_6.mem[i] = 1'b0;
675
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_1_7.mem[i] = 1'b0;
676
 
677
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_0_0.mem[i] = 1'b0;
678
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_0_1.mem[i] = 1'b0;
679
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_0_2.mem[i] = 1'b0;
680
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_0_3.mem[i] = 1'b0;
681
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_0_4.mem[i] = 1'b0;
682
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_0_5.mem[i] = 1'b0;
683
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_0_6.mem[i] = 1'b0;
684
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_0_7.mem[i] = 1'b0;
685
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_1_0.mem[i] = 1'b0;
686
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_1_1.mem[i] = 1'b0;
687
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_1_2.mem[i] = 1'b0;
688
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_1_3.mem[i] = 1'b0;
689
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_1_4.mem[i] = 1'b0;
690
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_1_5.mem[i] = 1'b0;
691
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_1_6.mem[i] = 1'b0;
692
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_1_7.mem[i] = 1'b0;
693
 
694
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_0_0.mem[i] = 1'b0;
695
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_0_1.mem[i] = 1'b0;
696
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_0_2.mem[i] = 1'b0;
697
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_0_3.mem[i] = 1'b0;
698
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_0_4.mem[i] = 1'b0;
699
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_0_5.mem[i] = 1'b0;
700
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_0_6.mem[i] = 1'b0;
701
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_0_7.mem[i] = 1'b0;
702
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_1_0.mem[i] = 1'b0;
703
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_1_1.mem[i] = 1'b0;
704
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_1_2.mem[i] = 1'b0;
705
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_1_3.mem[i] = 1'b0;
706
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_1_4.mem[i] = 1'b0;
707
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_1_5.mem[i] = 1'b0;
708
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_1_6.mem[i] = 1'b0;
709
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_1_7.mem[i] = 1'b0;
710
 
711
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_0_0.mem[i] = 1'b0;
712
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_0_1.mem[i] = 1'b0;
713
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_0_2.mem[i] = 1'b0;
714
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_0_3.mem[i] = 1'b0;
715
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_0_4.mem[i] = 1'b0;
716
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_0_5.mem[i] = 1'b0;
717
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_0_6.mem[i] = 1'b0;
718
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_0_7.mem[i] = 1'b0;
719
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_1_0.mem[i] = 1'b0;
720
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_1_1.mem[i] = 1'b0;
721
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_1_2.mem[i] = 1'b0;
722
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_1_3.mem[i] = 1'b0;
723
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_1_4.mem[i] = 1'b0;
724
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_1_5.mem[i] = 1'b0;
725
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_1_6.mem[i] = 1'b0;
726
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_1_7.mem[i] = 1'b0;
727
 
728
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_0_0.mem[i] = 1'b0;
729
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_0_1.mem[i] = 1'b0;
730
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_0_2.mem[i] = 1'b0;
731
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_0_3.mem[i] = 1'b0;
732
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_0_4.mem[i] = 1'b0;
733
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_0_5.mem[i] = 1'b0;
734
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_0_6.mem[i] = 1'b0;
735
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_0_7.mem[i] = 1'b0;
736
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_1_0.mem[i] = 1'b0;
737
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_1_1.mem[i] = 1'b0;
738
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_1_2.mem[i] = 1'b0;
739
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_1_3.mem[i] = 1'b0;
740
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_1_4.mem[i] = 1'b0;
741
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_1_5.mem[i] = 1'b0;
742
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_1_6.mem[i] = 1'b0;
743
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_1_7.mem[i] = 1'b0;
744
    end
745
`else
746
    for ( i = 0; i < (1<<4); i = i + 1 ) begin
747
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_0.mem[i] = 1'b0;
748
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_1.mem[i] = 1'b0;
749
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_2.mem[i] = 1'b0;
750
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_3.mem[i] = 1'b0;
751
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_4.mem[i] = 1'b0;
752
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_5.mem[i] = 1'b0;
753
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_6.mem[i] = 1'b0;
754
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_0.ram32x1d_7.mem[i] = 1'b0;
755
 
756
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_0.mem[i] = 1'b0;
757
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_1.mem[i] = 1'b0;
758
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_2.mem[i] = 1'b0;
759
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_3.mem[i] = 1'b0;
760
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_4.mem[i] = 1'b0;
761
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_5.mem[i] = 1'b0;
762
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_6.mem[i] = 1'b0;
763
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_1.ram32x1d_7.mem[i] = 1'b0;
764
 
765
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_0.mem[i] = 1'b0;
766
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_1.mem[i] = 1'b0;
767
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_2.mem[i] = 1'b0;
768
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_3.mem[i] = 1'b0;
769
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_4.mem[i] = 1'b0;
770
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_5.mem[i] = 1'b0;
771
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_6.mem[i] = 1'b0;
772
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_2.ram32x1d_7.mem[i] = 1'b0;
773
 
774
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_0.mem[i] = 1'b0;
775
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_1.mem[i] = 1'b0;
776
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_2.mem[i] = 1'b0;
777
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_3.mem[i] = 1'b0;
778
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_4.mem[i] = 1'b0;
779
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_5.mem[i] = 1'b0;
780
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_6.mem[i] = 1'b0;
781
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.xcv_ram32x8d_3.ram32x1d_7.mem[i] = 1'b0;
782
 
783
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_0.mem[i] = 1'b0;
784
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_1.mem[i] = 1'b0;
785
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_2.mem[i] = 1'b0;
786
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_3.mem[i] = 1'b0;
787
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_4.mem[i] = 1'b0;
788
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_5.mem[i] = 1'b0;
789
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_6.mem[i] = 1'b0;
790
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_0.ram32x1d_7.mem[i] = 1'b0;
791
 
792
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_0.mem[i] = 1'b0;
793
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_1.mem[i] = 1'b0;
794
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_2.mem[i] = 1'b0;
795
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_3.mem[i] = 1'b0;
796
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_4.mem[i] = 1'b0;
797
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_5.mem[i] = 1'b0;
798
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_6.mem[i] = 1'b0;
799
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_1.ram32x1d_7.mem[i] = 1'b0;
800
 
801
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_0.mem[i] = 1'b0;
802
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_1.mem[i] = 1'b0;
803
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_2.mem[i] = 1'b0;
804
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_3.mem[i] = 1'b0;
805
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_4.mem[i] = 1'b0;
806
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_5.mem[i] = 1'b0;
807
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_6.mem[i] = 1'b0;
808
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_2.ram32x1d_7.mem[i] = 1'b0;
809
 
810
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_0.mem[i] = 1'b0;
811
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_1.mem[i] = 1'b0;
812
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_2.mem[i] = 1'b0;
813
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_3.mem[i] = 1'b0;
814
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_4.mem[i] = 1'b0;
815
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_5.mem[i] = 1'b0;
816
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_6.mem[i] = 1'b0;
817
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.xcv_ram32x8d_3.ram32x1d_7.mem[i] = 1'b0;
818
    end
819
`endif
820
`else
821
    for ( i = 0; i < (1<<5); i = i + 1 ) begin
822
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_a.mem[i] = 32'h0000_0000;
823
        minsoc_top_0.or1200_top.or1200_cpu.or1200_rf.rf_b.mem[i] = 32'h0000_0000;
824
    end
825
`endif
826
`endif
827
    end
828
endtask
829
 
830
 
831
 
832 2 rfajardo
endmodule
833
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.