URL
https://opencores.org/ocsvn/turbo8051/turbo8051/trunk
[/] [turbo8051/] [trunk/] [rtl/] [8051/] [oc8051_top.v] - Diff between revs 2 and 61
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 61 |
Line 816... |
Line 816... |
`endif
|
`endif
|
|
|
`endif
|
`endif
|
|
|
|
|
|
// synopsys translate_on
|
|
// Debug Purpose only
|
|
// Stack Pointer Push & Pop analysis
|
|
reg [7:0] StackMem[$];
|
|
reg [7:0] stack_pop;
|
|
reg [7:0] pushpop_cnt;
|
|
|
|
// Assumption, Both Write and Read access will not be
|
|
// possbile in single clock cycle
|
|
always @(posedge wb_clk_i or posedge wb_rst_i)
|
|
begin
|
|
if(wb_rst_i) begin
|
|
pushpop_cnt = 0;
|
|
end
|
|
else begin
|
|
if(ram_wr_sel==`OC8051_RWS_SP) begin
|
|
StackMem.push_back(wr_dat);
|
|
pushpop_cnt = pushpop_cnt + 1;
|
|
end
|
|
if(ram_rd_sel==`OC8051_RRS_SP) begin
|
|
stack_pop = StackMem.pop_back();
|
|
pushpop_cnt = pushpop_cnt - 1;
|
|
#2 // Add 1ns Delay to take care of Ram Dealy
|
|
if(stack_pop != ram_data) begin
|
|
$display("ERROR: Invalid Stack Pointer Pop Detected, Exp: %x,Rxd:%x",stack_pop,ram_data);
|
|
$stop;
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
// synopsys translate_off
|
|
|
endmodule
|
endmodule
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.