Skip to content

CNN Example - How to input data to the synthesised block #1173

Answered by dimdano
thundertwonk001 asked this question in Q&A
Discussion options

You must be logged in to vote

The model accepts 3x16-bit input vectors using AXI4 interface. If there is a single input port, you basically pack the RGB pixel data into a 48-bit input. Set ap_start to high. Then you drive the input in synchronization with the clock signal (ap_clk). You also need to assert tvalid signals to '1' to indicate that valid data is ready on the input ports.

Data transfer occurs on every clock cycle where both tvalid (from your side) and tready (from the CNN IP block) are high, as per the AXI4-Stream handshaking protocol. On each clock cycle where tvalid and tready are both high, the current input data can be consumed and you can provide the next pixel's data on the following cycle. You repeat…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@thundertwonk001
Comment options

@thundertwonk001
Comment options

Answer selected by thundertwonk001
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@DrBwts
Comment options

@thundertwonk001
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants