Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

Support Vector Machine VHDL

Altera_Forum
Honored Contributor II
2,776 Views

I would like to know if there someone has a VHDL code for Support Vector Machine.  

 

I would also like to know if someone could explain to me this line of code  

 

res: out sfixed(7 downto -10)  

 

 

I know what is downto, but I have never seen it to a negative number before.  

Does that mean this is sfixed is 17 bits? If so why not 16 downto 0 

 

Thanks  

 

I also attached an SVM code that I understand but having trouble some parts. 

 

0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
1,932 Views

Its actually 18 bits signed fixed point number, with 8 bits integer and 10 bits fractional. 

 

The sfixed/ufixed types were added with VHDL 2008 (there is a 1993 compatability library). It allows you to represent fixed point numbers a bit more easily (and slightly less confusingly). Positive indexes are the integer part, and -ve are the fractional parts. 

 

eg. res : sfixed(1 downto -2) := "0101"; 

 

= 1.25 

 

"0011" = 0.75
0 Kudos
Altera_Forum
Honored Contributor II
1,932 Views

 

--- Quote Start ---  

I would like to know if there someone has a VHDL code for Support Vector Machine.  

 

I would also like to know if someone could explain to me this line of code  

 

res: out sfixed(7 downto -10)  

 

 

I know what is downto, but I have never seen it to a negative number before.  

Does that mean this is sfixed is 17 bits? If so why not 16 downto 0 

 

Thanks  

 

I also attached an SVM code that I understand but having trouble some parts. 

 

 

--- Quote End ---  

 

 

Please Sir, I need your help in making me understand this line 

 

use ieee.fixed_pkg.all 

 

when I ran the program, I found this problem 

 

ERROR:HDLParsers:3014 - "C:/Users/George1/Desktop/fixed_top.vhd" Line 4. Library unit fixed_pkg is not available in library ieee. 

 

I need the library please.  

 

Thank you so much
0 Kudos
Altera_Forum
Honored Contributor II
1,932 Views

 

--- Quote Start ---  

I would like to know if there someone has a VHDL code for Support Vector Machine 

--- Quote End ---  

 

 

Doing a quick search o the Web, we can find some academic researches and even working implementations on VHDL, but I would be cautious in regard to find some really trustworthy code. The LibSVM is a well known and reliable library, but wrote in C, with which you could consider running under a softcore environment, although loosing some performance in terms of speed if compared to a hardware-based implementation.
0 Kudos
Altera_Forum
Honored Contributor II
1,932 Views

 

--- Quote Start ---  

Please Sir, I need your help in making me understand this line 

 

use ieee.fixed_pkg.all 

 

when I ran the program, I found this problem 

 

ERROR:HDLParsers:3014 - "C:/Users/George1/Desktop/fixed_top.vhd" Line 4. Library unit fixed_pkg is not available in library ieee. 

 

I need the library please.  

 

Thank you so much 

--- Quote End ---  

 

 

How are you trying to compile the code? 

the fixed_pkg is part of the VHDL 2008 standard and is included with modelsim. For Quartus prime 15.1 and later, the package is included. For earlier versions, you need to find a version of the library from somewhere.
0 Kudos
Altera_Forum
Honored Contributor II
1,932 Views

>For Quartus prime 15.1 and later, the package is included. 

 

only PRO edition (aka ARRIA 10)
0 Kudos
Altera_Forum
Honored Contributor II
1,932 Views

 

--- Quote Start ---  

How are you trying to compile the code? 

the fixed_pkg is part of the VHDL 2008 standard and is included with modelsim. For Quartus prime 15.1 and later, the package is included. For earlier versions, you need to find a version of the library from somewhere. 

--- Quote End ---  

 

 

I am compiling the code with Xilinx ISE. 

You are right when I compile it with Modelsim, it runs with no error. 

How can I compile with Xilinx
0 Kudos
Altera_Forum
Honored Contributor II
1,932 Views

You'll need to get hold of the Xilinx version of the fixed_pkg that is '93 compatible.  

And you'll get more help on the Xilinx forum (this is a altera forum, Xilinx competitor.)
0 Kudos
Reply