UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
9,143 Views
Registered: ‎03-12-2015

Pulse generation using HLS

As subject, I want to write c program in HLS for pulse.I do know how to write program for the same in vhdl.

I have lot of questions on HLS

1.In HLS, main() is there?

2.Should we include studio.h file?

3.how can we compile/synthesize program?

4.will HLS create VHDL/verilog file or IP?

5.If I want to create IP, what are the additional steps are required?

6.Which files do we add to vivado project to use?

0 Kudos
6 Replies
Scholar u4223374
Scholar
9,091 Views
Registered: ‎04-26-2015

Re: Pulse generation using HLS

(1) You don't need to have a main(), except in the testbench. The top-level function can be called whatever you want, and should normally be something descriptive because it turns up in the module name as well.

 

(2) Might as well include it. It doesn't do any harm and it sometimes helps.

 

(3) You just hit the "Synthesis" button in Vivado HLS.

 

(4) It produces both VHDL and Verilog, and those can be packaged into an IP core.

 

(5) You just hit the "Export IP" button (after running synthesis), fill in the details (vendor, block description, etc).

 

(6) When you export the IP, HLS will generate a Zip file in the folder for whatever solution is active. Extract that Zip file somewhere logical (eg. "C:\Xilinx\HLS_IP_cores"), then add that folder to the Vivado IP location list. It'll find the HLS IP core and let you add it to the project.

 

 

With that said, for anything where you want exact control of timing, VHDL and Verilog will do a better job. HLS is great where you want to do a complex bit of processing (and you don't feel like writing a bunch of huge, pipelined modules). It's not good when you want to specify exactly what happens on each clock cycle.

0 Kudos
9,086 Views
Registered: ‎03-12-2015

Re: Pulse generation using HLS

I need example design (simplest) or reference documnet
0 Kudos
Scholar u4223374
Scholar
9,053 Views
Registered: ‎04-26-2015

Re: Pulse generation using HLS

UG902 is the main reference document for HLS.

0 Kudos
Teacher muzaffer
Teacher
9,043 Views
Registered: ‎03-31-2012

Re: Pulse generation using HLS

If you're trying to design a finely controlled pulse (or pulse stream), HLS is probably not the best tool to use. An RTL language would be more suited for that task.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Highlighted
Scholar u4223374
Scholar
9,021 Views
Registered: ‎04-26-2015

Re: Pulse generation using HLS

Here's the simplest example I can think of:

void pulse(volatile int * signal) {
    *signal = 1;
    *signal = 0;
}


This will probably produce a pulse with length one clock cycle. I say "probably" because HLS doesn't generally make that sort of guarantee. If HLS decides that it wants to hold the signal high for 20 clock cycles, there's not a whole lot that you can do to change that behaviour.

0 Kudos
Participant jehandad
Participant
4,845 Views
Registered: ‎06-08-2016

Re: Pulse generation using HLS

The HLS PROTOCOL directive allows a finer control on the timing of the signal and should be helpful in such scenarios, though it has its own limitations.

0 Kudos