Shengye Wang (and Prof. Taylor)
Shengye has helpfully provided infrastructure for getting your designs
running on an FPGA. He has a JTAG cable that connects a computer to the FPGA
board, and has written the code that interfaces the core's I/O interface to the JTAG
connection on the FPGA chip. After building with Quartus and downloading the FPGA .sof file, you can communicate
with your processor over the I/O channel using the PC's standard input and output. It looks like this:
// D_WIDTH : data width
// PA_WIDTH : port (i.e. IO channel) address width
module core#(parameter D_WIDTH = 34, PA_WIDTH = 4)
(
input clk
, input reset_i
, input [D_WIDTH -1 : 0] in_data_i
, input in_ack_i
, input out_ack_i
, output in_req_o
, output out_req_o
, output [PA_WIDTH -1 : 0] in_addr_o
, output [PA_WIDTH -1 : 0] out_addr_o
, output [D_WIDTH -1 : 0] out_data_o
);