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: 
Visitor sum@
Visitor
184 Views
Registered: ‎02-06-2019

vivado hls synthesis

I have got an error in vivado hls while synthesis process.

ERROR: [HLS 200-70] Compilation errors found:
Pragma processor failed: couldn't create error file for command: permission denied
Failed checking during preprocessing.
while executing
"source E:/suma/Suma/vhdl/hls/hdl/modulator/solution1/csynth.tcl"
invoked from within
"hls::main E:/suma/Suma/vhdl/hls/hdl/modulator/solution1/csynth.tcl"
("uplevel" body line 1)
invoked from within
"uplevel 1 hls::main {*}$args"
(procedure "hls_proc" line 5)
invoked from within
"hls_proc $argv"

0 Kudos
5 Replies
Explorer
Explorer
154 Views
Registered: ‎03-28-2016

Re: vivado hls synthesis

Does the C simulation compile and run properly for your module and the test bench?  If not, concentrate on getting the module and the testbench to compile and run correctly first.

Ted Booth - Tech. Lead FPGA Design Engineer
www.designlinxhs.com
0 Kudos
Visitor sum@
Visitor
119 Views
Registered: ‎02-06-2019

Re: vivado hls synthesis

Even though i checked several times  iam not able to identify the error please help me where the error is occuring i have attached the code also.

 

#include "ap_int.h"
#include "math.h"
#include "modulator.h"
// function that calculates sine wave samples value
void init_sine_table(ap_uint<width> *sine)
{
float temp;
init_sine: for (int i = 0; i < sine_samples; i ++)
// sin (2*pi*i / N) * (2^(width-1) - 1) + 2^(width-1) - 1, N = 2^depth
sine[i] = (ap_uint<width>)(sin(2*3.14*i/sine_samples)*(sine_ampl/2.0-1.0)+sine_ampl/2.0-1.0);
}
// pwm generator
void modulator(
ap_uint<1> sel, // signal used for selecting frequency
ap_uint<1> *pwm_o) // pointer to pwm output
{
static ap_uint<depth> counter = 0; // counter for sine wave sample counting
static ap_uint<width> sine[sine_samples]; // samples of the sine wave signal
// sine table initialization
init_sine_table(sine);
// hold pwm_o high for specified number of clock cycles
onloop: for (ap_uint<20> j = 0; j < (ap_uint<20>)(period[sel]*sine[counter]); j++)
{
*pwm_o = 1;
}
// hold pwm_o low for specified number of clock cycles
offloop: for (ap_uint<20> j = 0; j < (ap_uint<20>)(period[sel]*(sine_ampl - sine[counter])); j++)
{
*pwm_o = 0;
}
counter++;
}

 

 

 

testbench

#include <iostream>
#include "ap_int.h"
#include "modulator.h"
using namespace std;
ap_uint<1> pwm_o; // pulse width modulated signal
int main(int argc, char *argv[])
{
for (int i = 0; i < 256; i ++)
modulator(0, &pwm_o);
for (int i = 0; i < 256; i ++)
modulator(1, &pwm_o);
return 0;
}

Ihave wriiten these programs in vivado hls for creating an ip.

0 Kudos
Scholar xilinxacct
Scholar
98 Views
Registered: ‎10-23-2018

Re: vivado hls synthesis

sum@

Can you also post modulator.h

That being said, I don't think you would get a 'permission denied' from a run of the mill coding error. Have you ever had a successful compilation since you installed?

Also, I don't see any pragmas in the code posted... do you have anything in your directives? If so, are they valid?

0 Kudos
Visitor sum@
Visitor
83 Views
Registered: ‎02-06-2019

Re: vivado hls synthesis

 I have obtained  sucessful compilation and synthesis  program  .Here is the header file of the modulator.

#ifndef __PWM_H__
#define __PWM_H__
#include "ap_int.h"
#include <cmath>
using namespace std;
#define depth 8 // the number of bits used to represent sample count of sine wave
#define width 12 // the number of bits used to represent amplitude value
#define sine_samples 256 // maximum number of samples in one period of the signal
#define sine_ampl 4096 // maximum amplitude value of the sine wave
#define refclk_frequency 100000000 // reference clock frequency (100 MHz)
#define freq_low 1 // first frequency for the PWM signal, specified in Hz
#define freq_high 3.5 // second frequency for the PWM signal, specified in Hz
// minimum duration of high value of pwm signal for two different frequencies
const float period[2] = {(float)(refclk_frequency/(sine_ampl*sine_samples*freq_low)),
(float)(refclk_frequency/(sine_ampl*sine_samples*freq_high))};
// Prototype of top level function for C-synthesis
void modulator(
ap_uint<1> sel, // signal used for selecting frequency
ap_uint<1> *pwm_o); // pointer to pwm output
#endif

0 Kudos
Scholar xilinxacct
Scholar
60 Views
Registered: ‎10-23-2018

Re: vivado hls synthesis

sum@

As suspected... I ran the code you provided through Vivado HLS 2018.3 on Windows, and there was no permission denied error. (from synthesis through co-simulation) So, the code is not the problem. It would appear that something about your environment has become corrupted OR a change in permission (as in logging is as a different user) OR the file/folder permissions OR virus protection has made a file nonexecutable, ....

Are you using Linux? If you reinstalled I wonder if the result would change.

Hope that helps

If so, mark as solution accepted. Kudos also welcomed.

0 Kudos