02-26-2015 11:54 PM
Is it possible to add to HLS IP some customization parameters? I mean i have some software defines:
e.g. #define F_SIZE 6000, and i wan't to customize it (before synthesis) in Vivado -> Customize block option.
02-27-2015 03:56 AM
03-17-2015 01:26 PM
I think the question is how to insert a placeholder in the C code used for HLS, so the parameters can be propagated in from the IP package tool? Is that possible?
03-19-2015 09:48 PM
05-12-2015 04:05 AM
I try to get this running too.
In order to add customization parameters, I think VIVADO HLS have to generate generics.
Document UG1118 does not describe how to generate VHDL-generics form "#define statements in HLS code".
It only describes, how to import them.
Can you help?
Is there an example?
05-12-2015 10:05 AM
hello all -
it's not possible to have defines that will modify the IP that VHLS generates.
In the flow, VHLS generates the IP first, then this is used in Vivado / Vivado IPI. This IP is totally defined at compile time.
If you allowed parameters then you would need to regenerate the whole IP - eg you have a parameter that makes a code use char or int -> the tool needs to rerun to reapply the scheduling , timing estimatation, pipelineing, datapath growth etc. to have a parameter that changes a FIFO depth: the whole thing needs to change the state machine etc.
Anything that you think you want to have parameterized outside needs to be pulled outside of the VHLS IP. then configure like Debraj explained or use other IPs..
I hope this clears things out.
10-17-2016 08:06 AM
So in a very trivial situation when I return the input, for example:
entity my_nop is generic ( data_width : integer := 32 ); port ( A : in std_logic_vector(data_width-1 downto 0); B : out std_logic_vector(data_width-1 downto 0); ); end my_nop; architecture Behavioral of my_nop is B <= some_edit_to_data(A); end Behavioral;
Is this something HLS can't do?
10-17-2016 01:35 PM
your response / question is not relevant to the original issue and topic.
VHLS can take an input and generate a new (output) value from it.. what would be the point of designs with no inputs??!! please start a new thread..
10-17-2016 02:44 PM
Ok, I gues I could be a bit more specific. This topic is about creating a parameter for an IP designed in HLS, and that is what I wanted to ask about. I understand that I can't "have a parameter that makes a code use char or int". But what about a parameter that changes the width of the data? Like generic in the example I provided.
10-17-2016 02:59 PM
Similar answer as before: not possible.
If you want an IP with different data_width, then just do that.. a design with 512 or 1 might be widely different.
If you have to have only one then create one with 512 bits and instantiate with 1 bits input and outputs but i give no guarantees that the later tools will do the correct trimming for you.
Assuming the tool is able to tie off the unused inputs, are you ready to live with an IP that is potentially 512 times too big?
The tool might be improved in the future to support some flavor of the initial request/topic but I plainly don't know.
I hope this helps
10-17-2016 04:58 PM
Is there any chance of Xilinx telling us how the Video Test Pattern Generator block works? It's apparently built in HLS, but there are some handy customization options in Vivado (data width, maximum rows/columns, etc). Was it just built in HLS originally and then extensively hand-crafted to achieve that result, or is there hidden functionality in HLS that can do this?
10-18-2016 11:20 AM
10-18-2016 12:53 PM
actually I am using #defines for e.g. different bit-width and redo HLS.
In order to do this, I have to open the HLS-project, change the #define, compile the project and export it to the repository.
In vivado I have to refresh the IP repository and update my IP.
I agree with evanslatyer. The VTPG has customization options in VIVADO! This is great.
1. HOW are this options passed to HLS?
2. After an option was changed:
- How will the HLS-project compiled?
- Do I have to open the HLS-Project? Sorry, I am not able to try it. I have no license for this IP. And I did not found a further configurable HLS-IP in VIVADO:
10-18-2016 02:09 PM - edited 10-18-2016 02:13 PM
most of this is undocumented so I am not sure how well you can approximate what Xilinx is doing but at a high level this is how it works; the tool which ties everything together is TCL.
* the dialog box for the IP is described by v_tpg_v7_0.tcl
* the file v_tpg_config.ttcl (when is it called?) retrieves the parameters set by clicking OK on the config dialog and generates a file called tph_config.h
* hls_commands.ttcl generates the hls command script
* s_axis_video.xit does some other magic (who knows what?)
* finally one calls the "compile_c" Vivado command to convert the C/C++ files (presumably tpg_config.h is #included by v_tpg.cpp) to HDL using HLS and generate the IP.
* also there is a misc/logo.png file which has the vivado HLS icon in it. Presumably one can make an IP with a different file and it would be used in the IP package.
10-18-2016 02:56 PM
10-19-2016 04:24 AM
This is very interesting.
Is there perhaps an example anywhere?
As I said, I don't have a license for this IP.
Are there any other HLS-IPs delivered with the VIVADO standard intallation?
What a pity, that xilinx do not provide a complete documentation for this stuff. :-(
10-19-2016 04:25 AM
I know it's not magic, but it'd be really nice if we could do a block the same way!
At the moment the flow is "put block into Vivado, note that the bus width isn't suitable for this application, open HLS, change the #define, re-run synthesis, export the IP, refresh the IP repository in Vivado, insert the new IP, set the address, run synthesis" (optional: "note that the new block still has the same name as the old block and is therefore causing conflicts, open HLS, change the top function name, re-run HLS, export the IP, etc").
Whereas with the VTPG you just change the bus width and everything else works instantly.
I may have to try it using the steps you outlined, but it feels like the sort of thing that could/should be a really simple GUI or directive in HLS. Just like you can make global variables accessible on the external interfaces, an option to make #defines available in Vivado would do very nicely.
10-19-2016 09:09 AM