|
ME235 Laboratory 8Switching Control and Computer Interfacing, a.k.a Design of Embedded Systems |
The purpose of this lab is to build an interface between the SHARC board and the Xilinx part that
will allow you to read and write registers in the Xilinx part from C code running on the SHARC board.
process(clk, reset)
begin
if reset = '0' then
-- reset logic is here.
elsif rising_edge(clk)
-- sequential logic is here.
end if;
end process;
Use the Xilinx to provide 8, 8-bit registers.
These registers will be read/write registers, so they must be connected to INOUT pins on the Xilinx.
Connect three input pins on the Xilinx for address.
Connect the read and write signals of the bus to input pins on the Xilinx.
Use the read and chip select signals to control the output enable for the data bus.
Use the write signal and the decoded address to control writing to the eight registers.
Create a simple countdown clock to generate the acknowledge signal from the time the chip select goes true.
This time should can be relatively long (perhaps 1 microsecond) because of our long bus wires.
In particular, make sure that the timing for the chip select, read, write, and acknowledge are correct.
You should now be able to write a C program on the DSP that will read and write values to and from these registers.
Make sure that Memory Segment 2 is configured to require an acknowledge.
If the DSP hangs during your program, go back to basics and make sure that you can read on-board inputs and
write on-board outputs. Then, watch the MS2 chip select and the acknowledge. If the Xilinx part does not
drive the acknowledge, the SHARC will hang forever waiting for it.
Turn in the VHDL for the Xilinx program and the C code for the DSP.