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

Subversion Repositories oms8051mini

[/] [oms8051mini/] [trunk/] [rtl/] [8051/] [oc8051_top.v] - Blame information for rev 20

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

Line No. Rev Author Line
1 2 dinesha
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  8051 cores top level module                                 ////
4
////                                                              ////
5
////  This file is part of the 8051 cores project                 ////
6
////  http://www.opencores.org/cores/oms8051mini/                 ////
7
////                                                              ////
8
////  Description                                                 ////
9
////  8051 definitions.                                           ////
10
////                                                              ////
11
////  To Do:                                                      ////
12
////    nothing                                                   ////
13
////                                                              ////
14
////  Author(s):                                                  ////
15
////      - Simon Teran, simont@opencores.org                     ////
16
////      - Dinesh Annayya, dinesha@opencores.org                 ////
17 11 dinesha
//////////////////////////////////////////////////////////////////////
18 18 dinesha
////   v0.0 - Dinesh A, 8th Dec 2016
19
////        1. External ROM Interface Removed
20 2 dinesha
////                                                              ////
21
//////////////////////////////////////////////////////////////////////
22
////                                                              ////
23
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
24
////                                                              ////
25
//// This source file may be used and distributed without         ////
26
//// restriction provided that this copyright statement is not    ////
27
//// removed from the file and that any derivative work contains  ////
28
//// the original copyright notice and the associated disclaimer. ////
29
////                                                              ////
30
//// This source file is free software; you can redistribute it   ////
31
//// and/or modify it under the terms of the GNU Lesser General   ////
32
//// Public License as published by the Free Software Foundation; ////
33
//// either version 2.1 of the License, or (at your option) any   ////
34
//// later version.                                               ////
35
////                                                              ////
36
//// This source is distributed in the hope that it will be       ////
37
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
38
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
39
//// PURPOSE.  See the GNU Lesser General Public License for more ////
40
//// details.                                                     ////
41
////                                                              ////
42
//// You should have received a copy of the GNU Lesser General    ////
43
//// Public License along with this source; if not, download it   ////
44
//// from http://www.opencores.org/lgpl.shtml                     ////
45
////                                                              ////
46
//////////////////////////////////////////////////////////////////////
47
//
48
// CVS Revision History
49
//
50
// $Log: not supported by cvs2svn $
51
// Revision 1.32  2003/06/20 13:36:37  simont
52
// ram modules added.
53
//
54
// Revision 1.31  2003/06/17 14:17:22  simont
55
// BIST signals added.
56
//
57
// Revision 1.30  2003/06/03 16:51:24  simont
58
// include "8051_defines" added.
59
//
60
// Revision 1.29  2003/05/07 12:36:03  simont
61
// chsnge comp.des to des1
62
//
63
// Revision 1.28  2003/05/06 09:41:35  simont
64
// remove define OC8051_AS2_PCL, chane signal src_sel2 to 2 bit wide.
65
//
66
// Revision 1.27  2003/05/05 15:46:37  simont
67
// add aditional alu destination to solve critical path.
68
//
69
// Revision 1.26  2003/04/29 11:24:31  simont
70
// fix bug in case execution of two data dependent instructions.
71
//
72
// Revision 1.25  2003/04/25 17:15:51  simont
73
// change branch instruction execution (reduse needed clock periods).
74
//
75
// Revision 1.24  2003/04/11 10:05:59  simont
76
// deifne OC8051_ROM added
77
//
78
// Revision 1.23  2003/04/10 12:43:19  simont
79
// defines for pherypherals added
80
//
81
// Revision 1.22  2003/04/09 16:24:04  simont
82
// change wr_sft to 2 bit wire.
83
//
84
// Revision 1.21  2003/04/09 15:49:42  simont
85
// Register oc8051_sfr dato output, add signal wait_data.
86
//
87
// Revision 1.20  2003/04/03 19:13:28  simont
88
// Include instruction cache.
89
//
90
// Revision 1.19  2003/04/02 15:08:30  simont
91
// raname signals.
92
//
93
// Revision 1.18  2003/01/13 14:14:41  simont
94
// replace some modules
95
//
96
// Revision 1.17  2002/11/05 17:23:54  simont
97
// add module oc8051_sfr, 256 bytes internal ram
98
//
99
// Revision 1.16  2002/10/28 14:55:00  simont
100
// fix bug in interface to external data ram
101
//
102
// Revision 1.15  2002/10/23 16:53:39  simont
103
// fix bugs in instruction interface
104
//
105
// Revision 1.14  2002/10/17 18:50:00  simont
106
// cahnge interface to instruction rom
107
//
108
// Revision 1.13  2002/09/30 17:33:59  simont
109
// prepared header
110
//
111
//
112
 
113
 
114
`include "top_defines.v"
115
 
116
module oc8051_top (wb_rst_i, wb_clk_i,
117
 
118
//interface to data ram
119
                wbd_dat_i,
120
                wbd_dat_o,
121
                wbd_adr_o,
122
                wbd_we_o,
123
                wbd_ack_i,
124
                wbd_stb_o,
125
                wbd_cyc_o,
126
                wbd_err_i,
127
 
128
// interrupt interface
129
                int0_i,
130
                int1_i,
131
 
132
 
133
// port interface
134
  `ifdef OC8051_PORTS
135
        `ifdef OC8051_PORT0
136
                p0_i,
137
                p0_o,
138
        `endif
139
 
140
        `ifdef OC8051_PORT1
141
                p1_i,
142
                p1_o,
143
        `endif
144
 
145
        `ifdef OC8051_PORT2
146
                p2_i,
147
                p2_o,
148
        `endif
149
 
150
        `ifdef OC8051_PORT3
151
                p3_i,
152
                p3_o,
153
        `endif
154
  `endif
155
 
156
// serial interface
157
        `ifdef OC8051_UART
158
                rxd_i, txd_o,
159
        `endif
160
 
161
// counter interface
162
        `ifdef OC8051_TC01
163
                t0_i, t1_i,
164
        `endif
165
 
166
        `ifdef OC8051_TC2
167
                t2_i, t2ex_i,
168
        `endif
169
 
170
// BIST
171
`ifdef OC8051_BIST
172
         scanb_rst,
173
         scanb_clk,
174
         scanb_si,
175
         scanb_so,
176
         scanb_en,
177
`endif
178
// external access (active low)
179
                ea_in
180
                );
181
 
182
 
183
 
184
input         wb_rst_i,         // reset input
185
              wb_clk_i,         // clock input
186
              int0_i,           // interrupt 0
187
              int1_i,           // interrupt 1
188
              ea_in,            // external access
189
              wbd_ack_i,        // data acknowalge
190 11 dinesha
              wbd_err_i;        // data error
191 2 dinesha
 
192
input [7:0]   wbd_dat_i;        // ram data input
193
 
194
output        wbd_we_o,         // data write enable
195
              wbd_stb_o,        // data strobe
196 11 dinesha
              wbd_cyc_o;        // data cycle
197 2 dinesha
 
198
output [7:0]  wbd_dat_o;        // data output
199
 
200 11 dinesha
output [15:0] wbd_adr_o;        // data address
201 2 dinesha
 
202
`ifdef OC8051_PORTS
203
 
204
`ifdef OC8051_PORT0
205
input  [7:0]  p0_i;             // port 0 input
206
output [7:0]  p0_o;             // port 0 output
207
`endif
208
 
209
`ifdef OC8051_PORT1
210
input  [7:0]  p1_i;             // port 1 input
211
output [7:0]  p1_o;             // port 1 output
212
`endif
213
 
214
`ifdef OC8051_PORT2
215
input  [7:0]  p2_i;             // port 2 input
216
output [7:0]  p2_o;             // port 2 output
217
`endif
218
 
219
`ifdef OC8051_PORT3
220
input  [7:0]  p3_i;             // port 3 input
221
output [7:0]  p3_o;             // port 3 output
222
`endif
223
 
224
`endif
225
 
226
 
227
 
228
 
229
 
230
 
231
`ifdef OC8051_UART
232
input         rxd_i;            // receive
233
output        txd_o;            // transnmit
234
`endif
235
 
236
`ifdef OC8051_TC01
237
input         t0_i,             // counter 0 input
238
              t1_i;             // counter 1 input
239
`endif
240
 
241
`ifdef OC8051_TC2
242
input         t2_i,             // counter 2 input
243
              t2ex_i;           //
244
`endif
245
 
246
`ifdef OC8051_BIST
247
input   scanb_rst;
248
input   scanb_clk;
249
input   scanb_si;
250
output  scanb_so;
251
input   scanb_en;
252
wire    scanb_soi;
253
`endif
254
 
255
wire [7:0]  dptr_hi,
256
            dptr_lo,
257
            ri,
258
            data_out,
259
            op1,
260
            op2,
261
            op3,
262
            acc,
263
            p0_out,
264
            p1_out,
265
            p2_out,
266
            p3_out,
267
            sp,
268
            sp_w;
269
 
270
wire [31:0] idat_onchip;
271
 
272
wire [15:0] pc;
273
 
274
assign wbd_cyc_o = wbd_stb_o;
275
 
276
wire        src_sel3;
277
wire [1:0]  wr_sfr,
278
            src_sel2;
279
wire [2:0]  ram_rd_sel, // ram read
280
            ram_wr_sel, // ram write
281
            src_sel1;
282
 
283
wire [7:0]  ram_data,
284
            ram_out,    //data from ram
285
            sfr_out,
286
            wr_dat,
287
            wr_addr,    //ram write addres
288
            rd_addr;    //data ram read addres
289
wire        sfr_bit;
290
 
291
wire [1:0]  cy_sel,     //carry select; from decoder to cy_selct1
292
            bank_sel;
293
wire        rom_addr_sel,       //rom addres select; alu or pc
294
            rmw,
295
            ea_int;
296
 
297
wire        reti,
298
            intr,
299
            int_ack,
300
            istb;
301
wire [7:0]  int_src;
302
 
303
wire        mem_wait;
304
wire [2:0]  mem_act;
305
wire [3:0]  alu_op;     //alu operation (from decoder)
306
wire [1:0]  psw_set;    //write to psw or not; from decoder to psw (through register)
307
 
308
wire [7:0]  src1,       //alu sources 1
309
            src2,       //alu sources 2
310
            src3,       //alu sources 3
311
            des_acc,
312
            des1,       //alu destination 1
313
            des2;       //alu destinations 2
314
wire        desCy,      //carry out
315
            desAc,
316
            desOv,      //overflow
317
            alu_cy,
318
            wr,         //write to data ram
319
            wr_o;
320
 
321
wire        rd,         //read program rom
322
            pc_wr;
323
wire [2:0]  pc_wr_sel;  //program counter write select (from decoder to pc)
324
 
325
wire [7:0]  op1_n, //from memory_interface to decoder
326
            op2_n,
327
            op3_n;
328
 
329
wire [1:0]  comp_sel;   //select source1 and source2 to compare
330
wire        eq,         //result (from comp1 to decoder)
331
            srcAc,
332
            cy,
333
            rd_ind,
334
            wr_ind,
335
            comp_wait;
336
wire [2:0]  op1_cur;
337
 
338
wire        bit_addr,   //bit addresable instruction
339
            bit_data,   //bit data from ram to ram_select
340
            bit_out,    //bit data from ram_select to alu and cy_select
341
            bit_addr_o,
342
            wait_data;
343
 
344
//
345
// cpu to cache/wb_interface
346
wire [15:0] iadr_o;
347
 
348
 
349
//
350
// decoder
351 20 dinesha
oc8051_decoder u_decoder(
352 2 dinesha
          .clk                (wb_clk_i           ),
353
          .rst                (wb_rst_i           ),
354
          .op_in              (op1_n              ),
355
          .op1_c              (op1_cur            ),
356
          .ram_rd_sel_o       (ram_rd_sel         ),
357
          .ram_wr_sel_o       (ram_wr_sel         ),
358
          .bit_addr           (bit_addr           ),
359
 
360
          .src_sel1           (src_sel1           ),
361
          .src_sel2           (src_sel2           ),
362
          .src_sel3           (src_sel3           ),
363
 
364
          .alu_op_o           (alu_op             ),
365
          .psw_set            (psw_set            ),
366
          .cy_sel             (cy_sel             ),
367
          .wr_o               (wr                 ),
368
          .pc_wr              (pc_wr              ),
369
          .pc_sel             (pc_wr_sel          ),
370
          .comp_sel           (comp_sel           ),
371
          .eq                 (eq                 ),
372
          .wr_sfr_o           (wr_sfr             ),
373
          .rd                 (rd                 ),
374
          .rmw                (rmw                ),
375
          .istb               (istb               ),
376
          .mem_act            (mem_act            ),
377
          .mem_wait           (mem_wait           ),
378
          .wait_data          (wait_data          )
379
     );
380
 
381
 
382
wire [7:0] sub_result;
383
//
384
//alu
385 20 dinesha
oc8051_alu u_alu(
386 2 dinesha
          .rst                (wb_rst_i           ),
387
          .clk                (wb_clk_i           ),
388
          .op_code            (alu_op             ),
389
          .src1               (src1               ),
390
          .src2               (src2               ),
391
          .src3               (src3               ),
392
          .srcCy              (alu_cy             ),
393
          .srcAc              (srcAc              ),
394
          .des_acc            (des_acc            ),
395
          .sub_result         (sub_result         ),
396
          .des1               (des1               ),
397
          .des2               (des2               ),
398
          .desCy              (desCy              ),
399
          .desAc              (desAc              ),
400
          .desOv              (desOv              ),
401
          .bit_in(bit_out)
402
       );
403
 
404
//
405
//data ram
406 20 dinesha
oc8051_ram_top u_ram_top(
407 2 dinesha
          .clk                (wb_clk_i           ),
408
          .rst                (wb_rst_i           ),
409
          .rd_addr            (rd_addr            ),
410
          .rd_data            (ram_data           ),
411
          .wr_addr            (wr_addr            ),
412
          .bit_addr           (bit_addr_o         ),
413
          .wr_data            (wr_dat             ),
414
          .wr                 (wr_o &&
415
                               (!wr_addr[7] || wr_ind)),
416
          .bit_data_in        (desCy              ),
417
          .bit_data_out       (bit_data           )
418
`ifdef OC8051_BIST
419
         ,
420
          .scanb_rst          (scanb_rst          ),
421
          .scanb_clk          (scanb_clk          ),
422
          .scanb_si           (scanb_soi          ),
423
          .scanb_so           (scanb_so           ),
424
          .scanb_en           (scanb_en           )
425
`endif
426
                               );
427
 
428
//
429
 
430 20 dinesha
oc8051_alu_src_sel u_alu_src_sel(
431 2 dinesha
          .clk                (wb_clk_i           ),
432
          .rst                (wb_rst_i           ),
433
          .rd                 (rd                 ),
434
 
435
          .sel1               (src_sel1           ),
436
          .sel2               (src_sel2           ),
437
          .sel3               (src_sel3           ),
438
 
439
          .acc                (acc                ),
440
          .ram                (ram_out            ),
441
          .pc                 (pc                 ),
442
          .dptr               ({dptr_hi, dptr_lo} ),
443
          .op1                (op1_n              ),
444
          .op2                (op2_n              ),
445
          .op3                (op3_n              ),
446
 
447
          .src1               (src1               ),
448
          .src2               (src2               ),
449
          .src3               (src3               )
450
      );
451
 
452
 
453
//
454
//
455 20 dinesha
oc8051_comp u_comp(
456 2 dinesha
          .sel                (comp_sel           ),
457
          .eq                 (eq                 ),
458
          .b_in               (bit_out            ),
459
          .cy                 (cy                 ),
460
          .acc                (acc                ),
461
          .des                (sub_result         )
462
    );
463
 
464
 
465
//
466
//program rom
467
`ifdef OC8051_ROM
468 20 dinesha
  oc8051_rom u_rom(
469 2 dinesha
          .rst                (wb_rst_i           ),
470
          .clk                (wb_clk_i           ),
471
          .ea_int             (ea_int             ),
472
          .addr               (iadr_o             ),
473
          .data_o             (idat_onchip        )
474
     );
475
`else
476
  assign ea_int = 1'b0;
477
  assign idat_onchip = 32'h0;
478
 
479
  `ifdef OC8051_SIMULATION
480
 
481
    initial
482
    begin
483
      $display("\t * ");
484
      $display("\t * Internal rom disabled!!!");
485
      $display("\t * ");
486
    end
487
 
488
  `endif
489
 
490
`endif
491
 
492
//
493
//
494 20 dinesha
oc8051_cy_select u_cy_select(
495 2 dinesha
          .cy_sel             (cy_sel             ),
496
          .cy_in              (cy                 ),
497
          .data_in            (bit_out            ),
498
          .data_out           (alu_cy             )
499
    );
500
//
501
//
502 20 dinesha
oc8051_indi_addr u_indi_addr (
503 2 dinesha
          .clk                (wb_clk_i           ),
504
          .rst                (wb_rst_i           ),
505
          .wr_addr            (wr_addr            ),
506
          .data_in            (wr_dat             ),
507
          .wr                 (wr_o               ),
508
          .wr_bit             (bit_addr_o         ),
509
          .ri_out             (ri                 ),
510
          .sel                (op1_cur[0]         ),
511
          .bank               (bank_sel           )
512
 );
513
 
514
 
515
 
516
//
517
//
518 20 dinesha
oc8051_memory_interface u_memory_interface(
519 2 dinesha
          .clk                (wb_clk_i           ),
520
          .rst                (wb_rst_i           ),
521
// internal ram
522
          .wr_i               (wr                 ),
523
          .wr_o               (wr_o               ),
524
          .wr_bit_i           (bit_addr           ),
525
          .wr_bit_o           (bit_addr_o         ),
526
          .wr_dat             (wr_dat             ),
527
          .des_acc            (des_acc            ),
528
          .des1               (des1               ),
529
          .des2               (des2               ),
530
          .rd_addr            (rd_addr            ),
531
          .wr_addr            (wr_addr            ),
532
          .wr_ind             (wr_ind             ),
533
          .bit_in             (bit_data           ),
534
          .in_ram             (ram_data           ),
535
          .sfr                (sfr_out            ),
536
          .sfr_bit            (sfr_bit            ),
537
          .bit_out            (bit_out            ),
538
          .iram_out           (ram_out            ),
539
 
540
// external instrauction rom
541
          .iadr_o             (iadr_o             ),
542
 
543
// internal instruction rom
544
          .idat_onchip        (idat_onchip        ),
545
 
546
// data memory
547
          .dadr_o             (wbd_adr_o          ),
548
          .ddat_o             (wbd_dat_o          ),
549
          .dwe_o              (wbd_we_o           ),
550
          .dstb_o             (wbd_stb_o          ),
551
          .ddat_i             (wbd_dat_i          ),
552
          .dack_i             (wbd_ack_i          ),
553
 
554
// from decoder
555
          .rd_sel             (ram_rd_sel         ),
556
          .wr_sel             (ram_wr_sel         ),
557
          .rn                 ({bank_sel, op1_cur}),
558
          .rd_ind             (rd_ind             ),
559
          .rd                 (rd                 ),
560
          .mem_act            (mem_act            ),
561
          .mem_wait           (mem_wait           ),
562
 
563
// external access
564
          .ea                 (ea_in              ),
565
          .ea_int             (ea_int             ),
566
 
567
// instructions outputs to cpu
568
          .op1_out            (op1_n              ),
569
          .op2_out            (op2_n              ),
570
          .op3_out            (op3_n              ),
571
 
572
// interrupt interface
573
          .intr               (intr               ),
574
                       .int_v(int_src),
575
          .int_ack            (int_ack            ),
576
          .istb               (istb               ),
577
          .reti               (reti               ),
578
 
579
//pc
580
          .pc_wr_sel          (pc_wr_sel          ),
581
          .pc_wr              (pc_wr & comp_wait  ),
582
          .pc                 (pc                 ),
583
 
584
// sfr's
585
          .sp_w               (sp_w               ),
586
          .dptr               ({dptr_hi, dptr_lo} ),
587
          .ri                 (ri                 ),
588
          .acc                (acc                ),
589
          .sp                 (sp                 )
590
       );
591
 
592
 
593
//
594
//
595
 
596 20 dinesha
oc8051_sfr u_sfr(
597 2 dinesha
          .rst                (wb_rst_i           ),
598
          .clk                (wb_clk_i           ),
599
          .adr0               (rd_addr[7:0]       ),
600
          .adr1               (wr_addr[7:0]       ),
601
          .dat0               (sfr_out            ),
602
          .dat1               (wr_dat             ),
603
          .dat2               (des2               ),
604
          .des_acc            (des_acc            ),
605
          .we                 (wr_o && !wr_ind    ),
606
          .bit_in             (desCy              ),
607
          .bit_out            (sfr_bit            ),
608
          .wr_bit             (bit_addr_o         ),
609
          .ram_rd_sel         (ram_rd_sel         ),
610
          .ram_wr_sel         (ram_wr_sel         ),
611
          .wr_sfr             (wr_sfr             ),
612
          .comp_sel           (comp_sel           ),
613
          .comp_wait          (comp_wait          ),
614
// acc
615
          .acc                (acc                ),
616
// sp
617
          .sp                 (sp                 ),
618
          .sp_w               (sp_w               ),
619
// psw
620
          .bank_sel           (bank_sel           ),
621
          .desAc              (desAc              ),
622
          .desOv              (desOv              ),
623
          .psw_set            (psw_set            ),
624
          .srcAc              (srcAc              ),
625
          .cy                 (cy                 ),
626
// ports
627
          .rmw                (rmw                ),
628
 
629
  `ifdef OC8051_PORTS
630
        `ifdef OC8051_PORT0
631
          .p0_out             (p0_o               ),
632
          .p0_in              (p0_i               ),
633
        `endif
634
 
635
        `ifdef OC8051_PORT1
636
          .p1_out             (p1_o               ),
637
          .p1_in              (p1_i               ),
638
        `endif
639
 
640
        `ifdef OC8051_PORT2
641
          .p2_out             (p2_o               ),
642
          .p2_in              (p2_i               ),
643
        `endif
644
 
645
        `ifdef OC8051_PORT3
646
          .p3_out             (p3_o               ),
647
          .p3_in              (p3_i               ),
648
        `endif
649
  `endif
650
 
651
// uart
652
        `ifdef OC8051_UART
653
          .rxd                (rxd_i              ),
654
          .txd                (txd_o              ),
655
        `endif
656
 
657
// int
658
          .int_ack            (int_ack            ),
659
          .intr               (intr               ),
660
          .int0               (int0_i             ),
661
          .int1               (int1_i             ),
662
          .reti               (reti               ),
663
          .int_src            (int_src            ),
664
 
665
// t/c 0,1
666
        `ifdef OC8051_TC01
667
          .t0                 (t0_i               ),
668
          .t1                 (t1_i               ),
669
        `endif
670
 
671
// t/c 2
672
        `ifdef OC8051_TC2
673
          .t2                 (t2_i               ),
674
          .t2ex               (t2ex_i             ),
675
        `endif
676
 
677
// dptr
678
          .dptr_hi            (dptr_hi            ),
679
          .dptr_lo            (dptr_lo            ),
680
          .wait_data          (wait_data          )
681
       );
682
 
683
 
684
  `ifdef OC8051_BIST
685
       assign scanb_soi=scanb_si;
686
  `endif
687
 
688
 
689
 
690
  `ifdef OC8051_SIMULATION
691
 
692
    initial
693
    begin
694
      #1
695
      $display("\t * ");
696
      $display("\t * External rom interface: Pipelined interface");
697
      $display("\t * ");
698
    end
699
 
700
  `endif
701
 
702
 
703
 
704
 
705
 
706
// synopsys translate_off
707
// Debug Purpose only
708
// Stack Pointer Push & Pop analysis
709
reg [7:0]   StackMem[$];
710
reg  [7:0]  stack_pop;
711
reg  [7:0]  pushpop_cnt;
712
 
713
// Assumption, Both Write and Read access will not be
714
// possbile in single clock cycle
715
always @(posedge wb_clk_i or posedge wb_rst_i)
716
begin
717
   if(wb_rst_i) begin
718
      pushpop_cnt = 0;
719
   end
720
   else begin
721
      if(ram_wr_sel==`OC8051_RWS_SP) begin
722
            StackMem.push_back(wr_dat);
723
            pushpop_cnt = pushpop_cnt + 1;
724
      end
725
      if(ram_rd_sel==`OC8051_RRS_SP) begin
726
            stack_pop = StackMem.pop_back();
727
            pushpop_cnt = pushpop_cnt - 1;
728
            #2  // Add 1ns Delay to take care of Ram Dealy
729
            if(stack_pop != ram_data) begin
730
              $display("ERROR: Invalid Stack Pointer Pop Detected, Exp: %x,Rxd:%x",stack_pop,ram_data);
731
              $stop;
732
            end
733
      end
734
   end
735
end
736
 
737
// synopsys translate_on
738
 
739
endmodule

powered by: WebSVN 2.1.0

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