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 60

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

powered by: WebSVN 2.1.0

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