Hardware/Software Partitioning on the Triscend E5
In this lab, you will be using the Triscend
E5 in order to speedup software written in C.
The software accumulates all the values in an
array and displays the result on both 7 segment
LEDs. Therefore, the result is limited to 2 digits.
You will be implementing the accumulate loop
in hardware. This hardware will require the
following IP components:
-
Accumulator
-
DMA Selector
-
Data Write
-
1 status register
-
2 command registers
-
2 7-segment LEDs
Instructions
-
Download the c source code.
-
Download the dmap.c file.
-
Download the dmap.h file.
-
Implement the following circuit in the CSL:
-
The Data Write component allows values to be read from the CSI bus. The
DMA Selector is used to request that data from an array
should be read from memory and placed on the bus. The Accumulator will
accumulate values that are read from memory. The acknowledgement from the DMA
selector is connected to the clock enable of the accumulator so that
accumulation will only occur when valid data is present.
The Status Register will store
the
accumulated result.
The value in the status register can be read from software.
The Command Register components can be written to by software in order
to display values on the 2 7-segment LEDs.
-
Connect the 7 segment LEDs to the pins used in last week's tutorials.
-
Test the LEDs by writing values to the command registers (shown as debug
and debug2 in the sample c code). Note: you may have to change the names
of variables and header files depending on names used in your project.
-
To compile the C code, use the Keil compiler. This will be explained in
lab.
-
Once the LEDs are working, add in code to initialize the DMA.
-
Replace the accumulate loop with code that starts a DMA request and verify
that the accumulated value shown on the LEDs is correct.
-
Make sure to turn in the C code online.
Everything you need to know was covered
in the Triscend
tutorials. If you are stuck,
look over the tutorials again. Also,
you will definitely need the
datasheet to know how
the DMA works. Learning to read datasheets is
extremely important, so you won't receive help you until you
have at least looked at it.
|