📄 stack.v.bak
字号:
/*****************************************//** 8bit RISC MCU desing **//** stack module **//** BY yuzhijie **//** 2006.10.26 **//*****************************************/`timescale 1ns/100psmodule stack(clk4,pc_addr,stack_call,stack_retlw,stack1); input clk4,stack_call,stack_retlw; input [10:0]pc_addr; output [10:0]stack1; reg[10:0]stack1; reg[10:0]stack[1:0]; //stack[0]top of stackalways@(posedge clk4) begin if(stack_call==1) begin stack[1]<=stack[0]; stack[0]<=pc_addr+1; //input stack CALL end else if(stack_retlw==1) begin stack1<=stack[0]; stack[0]<=stack[1]; //output stack RETLW end endendmodule
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -