Bird: Hardware Design for CALL and RET instructions
module ilk_cpu(grounds, display, clk, pushbutton);
input pushbutton;
output [3:0\] grounds;
output \[6:0\] display;
input clk;
//memory map is defined here
localparam BEGINMEM=12'h000,
ENDMEM=12'h6ff,
KEYPAD1=12'h900,
KEYPAD2=12'ha00,
SEVENSEG=12'hb00;
// memory chip
reg \[15:0\] memory \[0:511\];
// cpu's input-output pins
wire \[15:0\] pc;
reg \[15:0\] data\_out, data\_in;
reg \[11:0\] address;
reg memwt;
// input-output devices's pins
reg \[15:0\] keypadregs \[1:0\];
reg \[15:0\] ss7;