Science topic

VHDL Programming - Science topic

Explore the latest questions and answers in VHDL Programming, and find VHDL Programming experts.
Questions related to VHDL Programming
  • asked a question related to VHDL Programming
Question
9 answers
Hello Everyone, I want to perform division operation in Verilog - HDL. Please suggest me an algorithm for division in which the clock cycle taken by division operation is independent on input. That is for division of any number a (a can be any number) by b(b can be any number),same number of clock cycle wil be taken by division operation for different set of a and b.  
Relevant answer
Answer
Here is a useful link that I found, with the block diagrams and Verilog codes
  • asked a question related to VHDL Programming
Question
4 answers
According to the number of Input and outputs ports of the FPGA chip we have, can we add (implement) any number of ethernet (100base) RJ45 and Fibre LC connector to the FPGA? What is the way to do that?
Also how can I also implement the following protocol into the FPGA; DNP3 , GOOSE and MODBUS?
which tools or libraries are using for these protocols on FPGA?
and what is best affordable cheap FPGA development board to buy with Ethernet Rj45 and Fibre LC connector SFP
Relevant answer
The paper in the link contains complete FPGA design and implementation on Xilinix VIRTIX 6 development board:
This paper introduces the field programmable gate array FPGA implementation of 1000BASE-X PHY Physical Layer for gigabit Ethernet over fiber optic cable. The implementation is achieved by developing VHDL model for all its building blocks including the physical coding sub layer, PCS, and the physical medium attachment, PMA. The VHDL code is simulated using XILINX ISE14.7 and synthesized on Xilinx Virtex6 FPGA chip. Measured results show that the designed and implemented Ethernet transceiver works successfully at 1.32 Gb/s, 2.5V supply with reduced power consumption.
There is even higher performance chips than Virtex 6 such as Verix 7.
  • asked a question related to VHDL Programming
Question
1 answer
Field programmable gate arrays (FPGAs) have been constantly used for embedded systems in various applications, such as inverters, medical appliances, etc. The reverse engineering in the FPGA is a way of re-configurating the netlist inside the FPGA in various ways. There are some known tools such as Debit, BIL, and Bit2ncd that could be especially used for Xilinx products. However, these are still under developmental phase. Are there more such products available for stable use? What if non-Xilinx products such as from Intel Altera FPGA's are adopted for use?
Relevant answer
Answer
as far as I know, there are no such tools around
  • asked a question related to VHDL Programming
Question
3 answers
Suppose A is a 'tri'. A is being connected to the output of a module which is instantiated twice,in both the instances. In one instance the value of A will be 1'bz and in the other it will be 1'b1.What will be the A's value? Could you provide the reference in any textbook like Samir Palnitkar or the other?
Relevant answer
Answer
Please try by applying behavioural and structural type code format, After that this basic knowledge for solving the counters and other higher level applications.
CMOS MIXED CIRCUIT DESIGN -BAKER-WILEY.
  • asked a question related to VHDL Programming
Question
3 answers
I am looking for an open source alternative for HDL Simulators such as Modelsim Student Edition (limited version). Any suggestions??
Relevant answer
Answer
For VHDL, there is GHDL : http://ghdl.free.fr
Arnaud
  • asked a question related to VHDL Programming
Question
8 answers
verilog or vhdl programming
Relevant answer
Answer
There are two very different aspects in this question.
1st: Comparison with respect to the target implementation
2nd: Similarity of languages with respect to their syntax
Some thoughts on the 1st aspect:
Target system for C programming is a processor-based computer. Target system for a hardware description language (HDL) is a digital circuit (either an ASIC or an FPGA/PLD).
But there have been made several approaches to use C for targeting digital circuits (e.g. HandelC, C-to-Hardware from Altium, SystemC, Xilinx HLS and other). By "nature" C is able to model combinational circuits without any problem but lacks the ability to perform clocked processes. Latter has been solved by SystemC libraries for example. With regard to combinational logic you have to detach yourself from the idea that the C-description will be performed in a step-by-step sequence consuming machine cycles. Like in a VHDL "process", which describes combinational logic, a piece of C-code has a sequential "order" but not a "sequential" timing then! Apart from the aspect that also combinational logic takes it's time (in magnitudes of pico- and nanoseconds) a combinational logic expressed by a sequential order inside of a VHDL-process, has an idealized delay time of zero!
Conclusion for the 1st aspect: Yes, C can easily be used to model combinational logic in a sequential order. It depends on the tools you have if you can make a useful digital circuit out of it.
Some thoughts on the 2nd aspect:
I'm not very familiar with Verilog. Therefore I might be wrong in some details.
Verilog's syntax is somehow C-like. VHDL syntax has been derived from the programming language ADA.
VHDL has the possibility to express combinational and sequential logic by means of processes. The entirety of all processes inside a VHDL module will run in parallel (true parallelism). The process can be conditioned to perform continuously (combinational logic) or in time steps (clocked sequential logic). In either case the VHDL-code inside of a process is evaluated in the sequential order as it is written, but in idealized delay time of zero (see above). Delay time in the combinational mode means reaction on change of any input, in clocked mode delay time is related to the active clock edge.
The programming style inside of VHDL processes is very similar to higher software programming languages.
Kind regards
Peter
  • asked a question related to VHDL Programming
Question
3 answers
I want jpg to bmp converter module in my vhdl project.
How can i write this? and where should i started?
Relevant answer
Answer
JPG format is too intricate, coding hardware to handle it is not trivial. If this is an undergrad project, you are shooting too high.
There is however a middle-ground solution. Use a softcore (e.g. microblaze) and a memory, those two fully coded in vhdl/verilog. Then write software that runs on the softcore and that software will do the actual work of parsing and understanding the JPG format.
  • asked a question related to VHDL Programming
Question
12 answers
Relevant answer
Answer
Most IoT applications require a processor core, memory, networking chip (BLE/WiFi/Zigbee etc.) and a controller to actuate external devices. The processor core in IoT can be replaced by FPGA. FPGA could be coupled with an ARM processor to leverage higher-level software functions such as Web servers, if higher level of processing is required. For more information of FPGA in IoT, read the following article: “Sensor Systems Based on FPGAs and Their Applications: A Survey”.
  • asked a question related to VHDL Programming
Question
8 answers
I need a VHDL program to read images and then XOR between them by using Altera kit.
Relevant answer
Xilinx has a lot of information about image processing, but you may try to send binary images via serial port in matlab, using a serial port modeled in VHDL (a lot of them in internet) and store them in a memory (xilinx and altera, both have models to do it) xor-them and send them back to matlab.  Al you need is a little state machine to control all the elements. P.S.You can also avoid using memory.   
  • asked a question related to VHDL Programming
Question
3 answers
I need to know about a detection method called two array processing in which two arrays are receiving data from a particular signal source.
I wanted to know about the detector design procedure.
any advice or references would be appreciated.
a figure is attached below.
Relevant answer
Answer
This amounts to information fusion, where the fusion is carried out on one of two levels:
  1. contact fusion --- each array performs signal detection independently, and the output of each detector is fused in a way that makes the combined performance better than either of the array detectors considered separately.
  2. signal fusion --- the raw, unprocessed signals at each array are combined at a lower level than detection, and a new detector is developed and applied to the total signal set in a way that makes the combined performance better than either of the array detectors considered separately. 
The kind of fusion depends on your access to the detector outputs and signals at each array. Detector outputs generally require low data rates. The signals generally require high data rates. if you have free and easy access to all possible information at each array, then either approach can be used.
Contact fusion (1) is usually much easier to implement, using an AND or an OR rule for the detector outputs for instance.  Note however that you must generally readjust the detection sensitivity of the detector at each array when their outputs are fused into a single detector. Otherwise you risk making the detection performance of the  fused output worse than the detection performance of each array detector working independently.
Note that you may have target association problems: How do you know that the signals at each array come from the same target? The signals at each array must be associated with each other, so that any detection processing across both arrays is always (usually) detection of the same target. This can be very problematic in multi-target and cluttered signals.
Ronald
  • asked a question related to VHDL Programming
Question
3 answers
I'm new in verilog, please help me!
My pattern is 8*8.
  • asked a question related to VHDL Programming
Question
4 answers
I tried using the HDL coder toolbox in Matlab. After conversion to VHDL the data type is real. I am getting an error because real is not able to synthesize in VHDL. Can anyone help me?
Relevant answer
Answer
Xilinx System Generator and DSP builder.
  • asked a question related to VHDL Programming
Question
9 answers
Does anyone know how to do this or have a useful link? I have tried downloading it from Mathworks but I can't seem to download it.
Relevant answer
Answer
By AccelDSP Synthesis Tool
  • asked a question related to VHDL Programming
Question
2 answers
RSA Cryptography
  • asked a question related to VHDL Programming
Question
1 answer
Dear all,
Hello
I have a question on "Online" VS "Offline" learning methods. In my thesis I have already simulated an "Online" method to train an RBM to develop a deep model (a DBN network) which is consisted of LIF neurons and uses spikes to train and test the model.
In my simulation with "Online" I mean that the model uses same platform for train and test. Indeed the model:
  1. Can be trained for any type of applications.
  2. The weights will be adjusted during the train process with input training spikes.
  3. and, in contrast with the "Offline" method which uses the trained weights (that have been adjusted and transferred to the test platform), the "Online" method uses same network for train and test.
Here, I want to know what the project means with "Online"? (Dose it mean same as what I have done in my thesis?)
Thank you very much.
Sincerely yours,
Mazdak Fatahi
Relevant answer
Answer
On-line learning in the said project is about learning on the go. Whenever there is a new situation the neural (network) will improve its knowledge by learning the additional knowledge to handle a new situation. Offline is more about static where a model is trained in the start with all the possible/available situations of the environment and then it is deployed. 
In other words, post-deployment need-based (re)training of model during its lifetime, as the new situations arise, is termed as on-line training. The aim is to make a model adopt autonomously to cope with such cases. 
  • asked a question related to VHDL Programming
Question
7 answers
I am trying to Implement the design to detect the pulse and according to that measure the frequency of that signal. But I am just in learning phase of VHDL coding, So I am having trouble in this. Any answers related to the topic are Welcomed. Thank you.
Relevant answer
Answer
Aparna Murthy, This is really helpful. Thank you.
  • asked a question related to VHDL Programming
Question
1 answer
I'm using 6:2 multiplier in my project. I know about 2:1 mux but i don't have any idea about 6:2 mux. so can any one help me for this?
Relevant answer
Answer
I do not understand what you mean by a 6:2 mux, however, the best way to do this is making a case statement on the select vector. In the case for every valid combination of you select assign the needed input bits to your output
process (sel)
begin
case sel is
when "000" =>
dout_1 <= din_1;
dout_2 <= din_2;
when "001" =>
dout_1 <= din_3;
dout_2 <= din_4;
when "010" =>
dout_1 <= din_5;
dout_2 <= din_6;
end case;
end process;
  • asked a question related to VHDL Programming
Question
8 answers
I programmed a sample VHDL program: 
library ieee;
use ieee.std_logic_1164.all;
entity notgate is
port(
a : in std_logic;
z : out std_logic
);
end entity;
architecture behave of notgate is
begin
if (a = '1') then
   z <= '0';
     else z <= '1';
end if;
end behave;
But it can not be synthesized. If I use process and set a as a sensitivity signal, the it can be synthesized.  
library ieee;
use ieee.std_logic_1164.all;
entity notgate is
port(
a : in std_logic;
z : out std_logic
);
end entity;
architecture behave of notgate is
begin
process(a)
begin
if (a = '1') then
z <= '0';
else z <= '1';
end if;
end process;
end behave;
I think these two methods realize a same circuit,  I do not know what is the different between them. 
Relevant answer
Answer
You cannot use "if" without "process" - try "when" instead!
z <= '0' when a = 1 else '1';
In this case, whether you use "process" + "if" or just "when" makes no difference.
BUT when you use processes, the code within the process works only when a signal in the process' sencitivity list changes value.
You can find a thorough example here: 
  • asked a question related to VHDL Programming
Question
4 answers
I am coding 8 point DIT FFT on VHDL. I am using 16 bit binary to represent numbers. But declaring complex numbers is problematic. How to declare complex numbers?
Relevant answer
Answer
For example you have a number  36.25+j24.58. here If you are using 32-bit system then, 36.25 you have to represent in 32-bit and 24.58 in 32-bit (in total 64-bit). Again in 32-bit use 16-bit for 36 and 16-bit for 0.25
  • asked a question related to VHDL Programming
Question
7 answers
i have a block in vhdl that produces an output of 8 bits (from 00 to FF) 00 represents value of -.125 and FF represents value of .125 
i want to add this value for another block as duty cycle step however the block has 16 bit duty values where 0000 represents 0 and FFFF represents 1
how can i interface both blocks 
Relevant answer
Answer
That's the 'trick' with the 2's complement format: adding of negative values is easily done. Regarding subtraction, it is just about getting the 2's complement of the subtrahend and adding :)
Regards
  • asked a question related to VHDL Programming
Question
2 answers
I have a data for a material including its n(refractive index) and k(extinction coefficient) values in an .xslx file. I need SILVACO to pick those nk values while it is simulating. But when i try to use this file in SILVACO it says that "Error: Read error in index file Optical_Properties_Of_InP.xlsx. Check format."
Any help.
Relevant answer
Answer
I have no idea
  • asked a question related to VHDL Programming
Question
4 answers
I am trying to design a Wallace tree using VHDL programing in Xilinx 13.4 software. I have completed my structural type VHDL programing. When we implement this programing on XILINX 13.4 design suit software then we saw the RTL view and there is no error in programing. But in this programing we used half adder and full adder as a PORTMAP. In XILINX 13.4 design suit software this half adder and full adder is not added so we not get the simulation result (Wave form).
Relevant answer
Answer
Please refer the attached code for full adder using half adder using Port Mapping. Let me know if you any query in the same.  
  • asked a question related to VHDL Programming
Question
3 answers
I have used transformer(even I have tried with ideal_balun available in analog library of Cadence) at the differential output and terminated with a port . I have measured output impedance of  the differential output and same thing set at output port.(i.e K times where K is turns ratio.) . The problem is compare normal measurement (i.e vout/vdiff) gain is falling by almost 10 dB.....i.e S21 is around only 4 dB instead of 14 dB..
Thanks in advance....
Relevant answer
Answer
Hi, well the buffer will add some noise (maybe around 0.5dB at worst), but you can characterize the LNA's NF with and without buffer, since your next stage is usually a downconversion mixer and not a 50 Ohm load.
  • asked a question related to VHDL Programming
Question
3 answers
I've been working with VHDL programming since a long time. And I want to know a good methodology of programming complex algorithms in  specially machine learning, signal processing.
Relevant answer
Answer
Thank you very much
  • asked a question related to VHDL Programming
Question
7 answers
this line is not working properly in my VHDL code
half_duty_new <= conv_integer(duty)*period/(2**bits_resolution)/2;
does it need a certain library ?
Relevant answer
Answer
Please provide complete files. Without package and signal declarations  I cannot say anything.
  • asked a question related to VHDL Programming
Question
6 answers
Hello Everyone, 
I am writing a code where i am giving the 1000 input values. After processing i am getting the output result. Now i want to use that output results as input. Need suggestions
Relevant answer
Answer
You feedback the output signals to input side through registers.
  • asked a question related to VHDL Programming
Question
3 answers
Hello! I am trying to simulate Pspice netlist in t-spice. I am using a mosfet and a subcircuit. The problem is, I get an error stating:
"syntax error, unexpected unary function call, expecting ) (right paren) or device or node name"
the line of code in which the error is popped is:
.FUNC ROUND(x) { x-IF(cos(PI*x)>0,arcsin(sin(PI*x))/PI,-arcsin(sin(PI*x))/PI) }
What exactly am I doing wrong here? And if someone does not have a direct answer, can you please tell me where can I find more information about these functions? Thank you in advance.
Relevant answer
Answer
You can visit to "http://www.ecircuitcenter.com/".
  • asked a question related to VHDL Programming
Question
4 answers
I need to compare received image with stored image using FPGA kit. For that need HDL coding.How can code to compare two images in HDL. Any other way is available to compare images?
Relevant answer
Answer
Dear Ravikumar,
I need information about, how to write HDL code, to compare images. For example, i need to compare two 512x512 image, If i compared pixel by pixel with its value, how to do? or any other tool do this simple manner?  
  • asked a question related to VHDL Programming
Question
3 answers
i implemented a function for comparison using this algorithm is there any simpler method for implementation 
function maximum6(a, b,c ,d ,e ,f: std_logic_vector) return std_logic_vector is
variable max: std_logic_vector(7 downto 0) := (others => '0');
variable max1: std_logic_vector(7 downto 0) := (others => '0');
variable max2: std_logic_vector(7 downto 0) := (others => '0');
variable max3: std_logic_vector(7 downto 0) := (others => '0');
variable maxf: std_logic_vector(7 downto 0) := (others => '0');
begin
if a > b then max := a;
else max := b;
end if;
if c > d then max1 := c;
else max1 := d;
end if;
if e > f then max2 := e;
else max2 := f;
end if;
if max > max1 then max3 := max;
else max3 := max1;
end if;
if max2 > max3 then maxf := max2;
else maxf := max3;
end if;
return maxf;
end maximum6;
Relevant answer
Answer
You have to be careful when implementing reductions like this one. Your code is probably extensive but correct.
While your approach implies the parallel reduction which has log(n) time complexity,the approach proposed by M. Ali Cavuslu implies a structure with linear time complexity equal to n, where n is the number of inputs.
This is demonstrated on the attached schematics of the resulting circuit structures obtained using Xilinx Vivado. It may depend on a particular synthesis tool, but tree reduction (your code) always guarantee to achieve best possible performance (i.e. timing). In your case, the circuit consists of  three levels while Cavuslu's code implies a structure requiring five levels.
If you want a generic approach, you have to write a generic tree reduction algorithm. Probably the simplest code might look like:
function max_tree_reduction(a, b, c ,d ,e ,f: std_logic_vector)
return std_logic_vector is 
   type my_type is array(0 to 5) of std_logic_vector(a'range);
   variable tmp: my_type;
   variable i,j : integer;
begin
  tmp := (a,b,c,d,e,f);
  for lvl in 0 to tmp'right/2 loop -- should be log2(tmp'right)
      for itm in 0 to tmp'right loop
           i := 2**(lvl+1) * itm;
           j := i + 2**lvl;
           next when ((i > tmp'right) or (j > tmp'right));
           if (tmp(j) > tmp(i)) then
               tmp(i) := tmp(j);
           end if;
       end loop;
    end loop;
    return tmp(0);
end max_tree_reduction;
  • asked a question related to VHDL Programming
Question
2 answers
I am working on chemical sensitive transistor using PCDTBT as active layer with NO2 as analyte.
PCDTBT is p type conductive polymer. NO2 is oxidising in nature. So in the presence of test gas, drain current increases at a fixed VDS and VGS.
Larger the VGS, more is the accumulation of charge carriers in the channel. That means the base current of sensor is increasing with increase in VGS.
We are keeping the gas concentration fixed as we want to see the effect of gate voltage.
The charge carriers generated by test gas should be the same for every VGS.
So with increase in gate voltage, response percentage ((Ig-Ia)/Ia) should fall.
Ig =drain current in presence of gas
Ia=drain current in air (no test gas)
What I am getting is not this trend.It is showing some zigzag behaviour at lower voltages.
Relevant answer
Answer
Dear Ashwini Kumar,
Check for repeatability of the measurement and reproduction at different rates of change of the gate bias. The Id-Vg curves of organic TFTs usually have peculiar behaviors. Compare to observations in
C. Feng, O. Marinov, M. J. Deen, P. Selvaganapathy, Y. Wu, "Sensitivity of the Threshold Voltage of Organic Thin-Film Transistors to Light and Water", Journal of Applied Physics, 117(18), 185501-1 to -9, 2015;  DOI:http://dx.doi.org/10.1063/1.4919829
Your response formula is valid at condition for reproducible static characteristics without temporal variations. If so, and as Mentioned by Maarten Swanenbrg, you have to find change dVT of threshold voltage induced by the gas, then to find the charge induced by the gas as dVT*Cox, and then to relate this charge sheet concentration to volume concentration of the gas. Note the other detail mentioned by Maarten Swanenbrg, that your formula should give different values at different gate biases.
However, all the above is valid at quasi-equilibrium, both "electrical" and "chemical". Thus, check the repeatability and reproduction of the measurements. There are some guidelines in the reference above to evaluate differential sensitivity when the static equilibrium is not present.
Sincerely,
Dr. O. Marinov 
  • asked a question related to VHDL Programming
Question
3 answers
I am geting the error Port a in top design unit dec24 is unconstrained
pls help
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity dec24 is
port(
a : in STD_LOGIC_VECTOR;
E : in STD_LOGIC;
d : out STD_LOGIC_VECTOR(3 downto 0)
);
end dec24;
architecture behavioral of dec24 is
begin
process (a)
begin case a is
when "00"=> d<="0001";
when "01"=> d<="0010";
when "10"=> d<="0100";
when others=> d<="1000";
end case;
end process;
end behavioral;
Relevant answer
Answer
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity dec24 is
port(
a : in STD_LOGIC_VECTOR (1 downto 0);
E : in STD_LOGIC;
d : out STD_LOGIC_VECTOR(3 downto 0)
);
end dec24;
architecture behavioral of dec24 is
begin
process (a)
begin
case a is
when "00"=> d<="0001";
when "01"=> d<="0010";
when "10"=> d<="0100";
when others=> d<="1000";
end case;
end process;
end behavioral;
  • asked a question related to VHDL Programming
Question
8 answers
Our project aims at studying the error-correcting code LDPC (low density parity check) .
 It is composed mainly of two parts : First, it is about a comparative study in terms of the structure of the parity matrix (both gallager and mackay) , the algorithm used (whether it is sum-product, min-sum, or normalized min-sum) and also the length of the departure message and the iteration number used in the algorithms. All these will be achieved using Matlab environment. The second part will be devoted to write  a simple  VHDl program  so that we be able then to implement our decoder LDPC on a FPGA card.
Relevant answer
Answer
see these
file:///C:/Documents%20and%20Settings/home/My%20Documents/Downloads/White%20Paper%20for%20Low%20Density%20Parity%20Check%20(LDPC)%20Codes%20(1).pdf
  • asked a question related to VHDL Programming
Question
4 answers
I am interested to know
Relevant answer
Answer
I researched this problem in the article "The failure risk analysis of digital circuits".
  • asked a question related to VHDL Programming
Question
17 answers
I know VHDL and did some projects, I am familiar with the hardware design concepts. What i need is a reference book in which i can get the rules in Verilog
something like
It is not possible to assign a wire data type inside always.
All ports are defined as reg data types.
Relevant answer
Answer
I found this book useful:
Fundamentals of Digital Logic with Verilog Design
by: Stephen Brown and Zvonko Vranesic
  • asked a question related to VHDL Programming
Question
4 answers
Both Bluespec and VHDL are used for synthesis. But is there any domain in which a choosing Bluespec would be useful than VHDL?
Relevant answer
Answer
The major points for Blue-Spec is
1. Designer can save time (almost 40% of time you can save)
2. Module integration is easy and control signal handling has been taken by Blue-Spec tool itself
3. After completing the design you will get a 70-80 % verified code
4. The synthesized frequency is almost same for the VHDL and Blue-Spec designs
6. Blue-Spec support team is very good. 
  • asked a question related to VHDL Programming
Question
10 answers
Thanks in advance for your replies.
Relevant answer
As far as I remember there is a paper that covers how to obtain the netlist from the bitstream: "From the bitstream to the netlist"  by Jean-Baptiste Note and Éric Rannaud (http://dl.acm.org/citation.cfm?id=1344729) or https://www.researchgate.net/publication/200065272_From_the_bitstream_to_the_netlist
Another paper is "BIL: A tool-chain for bitstream reverse-engineering" by Florian Benz et al. (http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6339165). You can get the open source of the project in the following URL: https://github.com/florianbenz/bil/
Hope this helps
  • asked a question related to VHDL Programming
Question
3 answers
RSA Cryptography
Relevant answer
Answer
The question is pretty vague ("very large" is subjective), but I'm assuming based on the "RSA Cryptography" tag that you mean 1024 to 8192 bits and are interested in good probable prime tests rather than proofs.  Quick answer for RSA: multiple Miller-Rabin tests with random bases followed by a single strong Lucas test, using the FIPS 186-4 tables to decide how many to use.  Quick answer for non-RSA: BPSW for non-proofs, APR-CL or ECPP for proofs.
Typically we first add a pretest looking for small factors, as this returns very quickly for composites.  This can be done by trial division or a big gcd, for example.
Easiest:  multiple Miller-Rabin tests with random bases.  See FIPS 186-4 for a suggested number of tests for given sizes and security levels, if this is for cryptographic use.  There are deterministic base sets for 64-bit numbers.
Better: Add a Lucas test, preferably the strong test.  This is anti-correlated to the M-R tests, and runs in about the speed of 2 M-R tests, so gives better results in practice.  FIPS 186-4 also gives numbers for how many M-R tests to run in combination with a Lucas test.   For non-crypto work, a single base-2 M-R test plus a strong Lucas test makes the BPSW primality test, which is quite popular for general probable prime testing.  It runs quickly, is deterministic, is shown correct for all 64-bit numbers, and even the weakest variants have no known counterexamples for larger inputs (though we expect them to exist).
For primality proofs, there are various methods for special input forms that are fast, such as the Lucas-Lehmer test for Mersenne numbers.  For tiny 64-bit numbers we can just use BPSW.  For somewhat larger numbers, the BLS75 methods work well if you have integer factoring code.  APR-CL and ECPP are recommended methods for large inputs, with ECPP having done a few numbers in the 18k to 25k digit range.  ECPP generates a certificate, unlike APR-CL or AKS.  AKS is far too slow to be useful at any size.
  • asked a question related to VHDL Programming
Question
3 answers
the aim is to produce an optimal electronic circuit for cheap from a VHDL programe (not using the MOD FPGA)?
thank you for answer
Relevant answer
Answer
Dear Pierre,
CAD tools such as Quartus-II by Altera or Xilinx IDE support conversion in both directions. You can find a free versions of these tools on the manufacturer's web-pages. For instance,
  • asked a question related to VHDL Programming
Question
13 answers
I used the xpower analyzer to estimate both dynamic and quiescent power consumption of my design, but when I performed it for different codes, I got the same value for all. I did the .pcf and .saif files uploads, but I don't know how to upload the settings file, i.e. I don't know how to generate the settings file. Am I missed some part of the procedure?
Relevant answer
Answer
Hi Sumathi Gokulanathan,
Let me first tell you the simple procedure of using the Xilinx XPower Analyzer (for understanding) and then some information on that.
Implement the top module using the Xilinx ISE
Open the XPower Analyzer listed in the Place and Route tab of the Design sub window
After the design gets loaded 100%, in the 'Report Navigator' sub window of the XPower Analyzer, click on the 'By Clock Domain' listed in the 'Details' tab.
A list of the clock signals and the clock driven synchronous signals appears in the window pane, by the side if the 'Report Navigator'.
If your design uses clock, change the value of the Frequency of the clock, in the concerned field. (The default value given is 0 MHz)
After changing the clock frequency to the desired value, click on the 'Update Power Analysis' icon in the Toolbar.
After the update gets finished, click on the summary, listed in the 'Report Navigator', to get the updated power values.
NOTE: To measure the power values at different frequencies, restart the XPower Analyzer to get correct values. If you change the frequency many times at a single run, the power values get added up as the algorithm (according to my knowledge) preserves the previous values of power to add them in calculating the power values of next frequency.
All the best,
Regards
NP.
  • asked a question related to VHDL Programming
Question
17 answers
Hi,
A part of my project in Signal Processing is to generate a sine signal with the cordic algorithm in VHDL and put the VHDL Code on a board and test it. Do somebody have an idea for a VHDL code example?
Thanks a lot
Relevant answer
Answer
Hi
the descreption of algorithm Cordic implemented by the logic element as Adder and substractor divice.
this file for the shifting regiter 
  • asked a question related to VHDL Programming
Question
1 answer
Any EDA Vendor or IC Designer that might have started working on creating hardware accelerators for Internet of Things.
Relevant answer
Answer
Internet of Things is an application domain for semiconductors. Microprocessors, microcontrollers, DSP, analog ICs, RFICs, ... all of these will be employed in an IoT application. So, a simple answer to your question is, yes - companies have a large number of solutions for IoT.  Example - Feel free to look at the CC3000 series of semiconductors - http://www.ti.com/product/cc3000
  • asked a question related to VHDL Programming
Question
10 answers
Port mapping refers to the concurrent statements and process refers to the sequential statement. If there is a data dependency between the blocks of the concurrent statements, each block itself is a concurrent statement and the entire flow becomes sequential because each block output goes to the input of the next block. In that case why can't we include these concurrent statements inside the process? I am confused and I don't know the reason for this.
Relevant answer
Answer
Port map is only used for physical signals and while process is a virtual operations that use variables which requires zero time to execute ( concurrent statements)
  • asked a question related to VHDL Programming
Question
8 answers
I am using Xilinx ISE 12.2 version. Even after implementation, .ncd file is not available in the project folder. I want to know whether it is because of any setting changes? Do any of you face the same problem... Help me clarify this doubt...
  • asked a question related to VHDL Programming
Question
1 answer
I need to divide a 32 bit random number into two 16 bit random numbers to generate a lognormal distributed clutter. A block diagram is shown in the file below.
Relevant answer
Answer
we can divide any bit random number by using Box muller technique.
  • asked a question related to VHDL Programming
Question
3 answers
Glitch in digital circuits.
Relevant answer
Answer
As far as know there are no proved solutions yet to perform ab initio calculation. It is not an easy task since it needs accurate analog knowledge of the circuit and its digital activity. But of course it can be estimated: you may proceed performing accurate analog simulations on your digital gates to estimate power consumption per glitch and how it depend on loading capacitance. If possible make analog montecarlo simulations to estimate average values. Once you know average power consumption per glitch, you should estimate the rate of glitches per second on the specific circuit by providing custom or random stimuli in digital simulation of the concrete circuit.
  • asked a question related to VHDL Programming
Question
3 answers
I am using the FPGA for image processing related projects. A microblaze processor is used inside the FPGA but I don't see any specification regarding that in datasheet which I have now.
Relevant answer
Answer
MicroBlaze is a soft processor that gets implemented in the FPGA fabric. You can implement as many MicroBlaze cores as you can in every Xilinx FPGA.
In the Spartan3 200 you only have 4300 logic cells, which will be just enough for one core plus some peripherals but not more.
The Microblaze reference Guide is the UG081:
Hope that will help you.
Regards
Olivier
  • asked a question related to VHDL Programming
Question
5 answers
Use of real numbers like 2.34 in vhdl - what is the technique to convert in fixed point type?
Relevant answer
Answer
I second Nicholas commend. VHDL has both fixed- and floating-point types for synthesis since the 2008 revision. You can download the relevant packages from here: http://www.eda.org/fphdl/ . They are also available as a free download since 2013 from the IEEE themselves (search for machine readable codes for IEEE 1076-2008).
  • asked a question related to VHDL Programming
Question
4 answers
I am facing a problem in VHDL via ModelSim. It is an error in my if-statement. if ((s(0) = c(0)) AND (NOT(x1(0)))) THEN I:= (others => '0'); end if; Here is my if-statement and the error is: "No feasible entries for infix operator "and"." But, after I tried to check the program I realized that the problem is with using (not gate). Maybe, there is another way of using it in vhdl. Could anyone help? I mean the first condition is Boolean and the next is std_logic operation.
Relevant answer
Answer
You do not need to write "(NOT(x1(0)))". Just check whether " x1(0) = '0'; "
You could use something like:
if (s(0) = c(0) and x1(0) = '0') then
I:= (others => '0');
end if;
  • asked a question related to VHDL Programming
Question
8 answers
I am working on project of FPGA Based Face recognition.
Relevant answer
Answer
Hi..
There is no such a tool to convert matlab code into VHDL code.. Eventhough, if it is, it will produce inefficient code.. not all the matlab generated VHDL codes are efficient. its better to try it in vhdl itself, instead of conversion.
  • asked a question related to VHDL Programming
Question
3 answers
I started my program by writing subprograms as functions in VHDL. Then I have tested them separately, and all of those subprograms worked fine. Fortunately, when I combined them and started my primality testing, I found that my program was performing well, but for certain number, the program began to output all the results as composite. I was just wondering what problems might cause this bug. By the way, my program was designed to be 32-bit primality testing. However, the program work fine until I test the numbers above 46399. Then all prime and composite numbers outputted the same result as "composite". This really confused me. Please, need your help.
Relevant answer
Answer
Let's assume your algorithm is right
That is, you've got the one you've implemented in VHDL working in one of Scilab, Matlab, Octave, Python, C/C++, etc.. Now use that to generate input/output golden"test vectors" for different parts of your VHDL model. Usually I try and skip this part, but invariably when using an HDL like VHDL, I need to come back and "test" the intermediate values produced by the high-level language model against the HDL model I'm trying to get to work.
Given that, then you are trying to debug your VHDL implementation.
If by "functions" above, you mean VHDL functions, please understand their limitations.
They are not like C/C++ functions, and are a fairly advanced concept in the VHDL scheme of things. Look at http://www.eda.org/fphdl/ for examples of functions that are also synthesizable(I'm assuming that you want your VHDL model to be synthesizable, but are currently stuck on getting the simulation (perhaps using the ModelSim simulator) working correctly.
I'd recommend that if you are looking for speed from your VHDL model that you use the Entity-Architecture Register Transfer Level(RTL) methodology to design your parallel components, Embrace the clock, pipelining and their semantics, as that is is where your parallel speed will come from. I only use functions and procedures as semantic sugar until I'm comfortable that my basic design works with memory, logic, pipe lining, and clocks.
alan
  • asked a question related to VHDL Programming
Question
3 answers
I used x signal as one of the input signal in one verilog module, but during instantiation I used this signal as wire signal. But in top module, x is as wire signal. Can I give x signal as input signal and do simulation?
I tried like this, but its showing that x is not i/o port in top module.
I want to give signal to x port and check for some output port which is also wire signal in top module, is it possible in verilog simulation?
Relevant answer
Answer
If you are using Altera, there is a tool named SignalTap - it can be embedded on the same FPGA and can serve you as a logic analyzer that can help you see internal signals that are not I/Os. In Xilinx there is a tool named ChipScope that serves the same purpose. You should check with your product version which tool is suitable for you. Also, if you have a testbench and are using ModelSim, then you can delve in the internal signals no matter that they are not inputs or outputs of the top module. I do not remember quite well, but maybe the same thing is possible with the Xilinx's ISim as well.
Good luck!
  • asked a question related to VHDL Programming
Question
2 answers
I know its 16 bit * 16 bit multiplier, but I want to know about its functionality in detail.
Any link to know more about ISCAS circuits.
Relevant answer
Answer
You can achieve m x n multiplications by adding m , n times. That is what this circuit doing.
  • asked a question related to VHDL Programming
Question
2 answers
Its regarding fpga based implementation of eye tracking system.
Relevant answer
Answer
check this great resource for all FPGA projects, they have various image\video processing projects
  • asked a question related to VHDL Programming
Question
1 answer
If there is possibility, then can we write/call the program directly inside simulink library file. Or is it necessary to install third party toolbox or add-on in order to allow it?
Relevant answer
or maybe you prefer to shift to matlab hdl coder (check key features) http://www.mathworks.es/products/hdl-coder/
  • asked a question related to VHDL Programming
Question
6 answers
I need any document or flow related to this topic.
Seeking to interface samsung 313A CCD camera to the Spartan 3E kit
Relevant answer
Answer
There are two problems with USB cameras when you try to connect them to FPGAs:
- you need an USB IP (hardware driver): you have to be an expert to develop your own IP, alternatively you can buy a commercial IP but they are expensive.
- once your FPGA receives the USB packets you have to extract the image data, but usually there is no information about how the data are packaged. You need to do inverse engineering to find the data structure.
A realistic way is to use a soft-micro or hard-micro, integrated in the FPGA, able to support a OS like Linux. There are several reference designs where webcam is connected to Zynq devices (zedboard and microzed).
Good luck
  • asked a question related to VHDL Programming
Question
4 answers
I need this for implementation purpose using ALTERA FPGA Kit
Relevant answer
Answer
This is really important for me, so please contribute to this question with useful and straight forward answer
  • asked a question related to VHDL Programming
Question
2 answers
Can anyone please suggest to me how to measure the on chip FPGA power consumption? I have made a design and analysed the power with Xpower analyser (xilinx tool).
I would like to check how much power it is actually consuming, after loading the design on to FPGA.
Relevant answer
Answer
Power can be measured by measuring the voltage drop of a shunt (low value) resistor in series with the voltage source of the FPGA. Some commercial kits provide a jumper in the power supply to allow inserting a current mesurement circuit (like an amperimeter). You can also find kits that include the power mesurement circuit on board (like Terasic DE4).
If you are using a kit that has not these features you could cut the power line in the PCB to build a similar thing yourself. I wouldn't do it, but I know people that have done it.
Then, you have indirect techniques, like implementing ring oscillators on the FPGA and measure their oscillating frequency. The oscillating frequency depends on temperature, and temperature depends of thermal power dissipation, so I think you could build up an empirical model to get some power estimation with this technique.
E Boemo, et al "Thermal monitoring on FPGAs using ring-oscillators"
I guess it would not be very accurate, though
  • asked a question related to VHDL Programming
Question
4 answers
Seeking the flow.
Relevant answer
Answer
You need Xilinx system generator support in your Matlab toolbox. Then only it is quite easy to design in simulink & convert to vhdl code completely. Refer:
Otherwise, target support packages based code conversion is possible but one cannot expect everything is taken care by the software tool itself. It depends on your design problem. Steps to convert it into vhdl in this mode is available in help menu.
  • asked a question related to VHDL Programming
Question
56 answers
This new design would assure that a multiplication would be computed on a multiplier that has been optimized in terms of power and delay for a specific bitwidth
Relevant answer
Answer
As the other members have commented, the coding language should be the least of your worries. You have to work on getting the implementation into the code. If I were to pick a language for any design, I would go with VHDL, since it is quite structured and the debugger can catch some errors which you may not see in simulation. Verilog on the other hand, is awesome for testbenches.
  • asked a question related to VHDL Programming
Question
15 answers
I just started to implement my system (OFDM transmitter and receiver) using altera DE1 cyclone II board. In fact, I need advises as first request and I need a VHDL code (or verilog but VHDL is more important for me) for the RS-232 DB9 serial port. I found many codes using google but I need a standard code and simple where I can communicate with its author for explanation.
Relevant answer
Answer
I solved my problem, thanks to all