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 109

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

powered by: WebSVN 2.1.0

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