Questions tagged [vhdl]
VHDL (VHSIC Hardware Description Language) is a language used in electronic design to describe digital systems such as FPGA (field-programmable gate arrays) and IC (integrated circuits).
5,832
questions
0
votes
0
answers
44
views
I need to implement a VHDL code of adding 2 8-bit unsigned numbers
The catch is, my sum needs to start with "00" for the first 10ns, then it continues on normally, and I'm having problems with figuring out the carry out
architecture behave of adder is
...
0
votes
1
answer
32
views
Type of identifier does not agree with its usage as "boolean" type - VHDL in Quartus
I'm developing a simple buffering system in VHDL. I get the error I mentioned in the title for "empty" whenever I try to compile. I don't know why it won't let me invert a std_logic type. I'...
-2
votes
0
answers
33
views
VHDL - (modelsim) - Fatal error that indicated during simulation
my VHDL code
i went to simulate this at modelsim but a fatal error occurs saying:
Fatal: (vsim-3734) Index value -1 is out of range 4 downto 0.
Time: 0 ps Iteration: 0 Region: /carry_select_adder/P7(...
0
votes
0
answers
38
views
How to initialize a signal inside of a component when doing simulation?
I am writing VHDL code to implement a counter, and it can work on my chip but I cannot do simulation. Below is my code:
Here is code for flip flop:
library ieee;
use ieee.std_logic_1164.all;
use ieee....
0
votes
0
answers
33
views
Count how many inputs are equal to 1,2 and 3
I'm learning VHDL, and I'm trying to count how many inputs are equal to 1,2 and 3. I'm using so many If's for this. Does anyone know a smarter way to do that, without need check input by input? I want ...
0
votes
0
answers
26
views
testbench not working with std_logic_vector(3 downto 0) as output
i was trying to do a simple block that takes every value of 2 vectors (3 downto 0) and applies an "and" gate to them. But my testbench doesn't work.
Here is my block code;
library IEEE;
...
0
votes
1
answer
37
views
Instantiate VHDL entity with 2D array from SystemVerilog
There seems to be very little documentation on how to pass 2D arrays between VHDL and SystemVerilog. I have a port of the following type in VHDL:
package my_package is
type my_array_t is array (...
-1
votes
0
answers
30
views
Why my simulation with clock in ModelSim cannot work?
I am writing a counter using VHDL on quatus. And below is my code:
This is code for a flip_flop:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned....
-1
votes
0
answers
32
views
Can someone help me identify the error in my VHDL code? The log is referencing line 7 and 19, but they seem to be ok to me
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
ENTITY add4par IS
PORT(
c0 IN STD_LOGIC;
a, b IN STD_LOGIC_VECTOR(4 downto 1)
c4 OUT STD_LOGIC;
sum OUT ...
-1
votes
0
answers
26
views
i keep on getting these erros when i try to program the FPGA on the MachX03 series development board. Can someone please help me fix these? [closed]
This is my code;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity CC2510_prac3 is
port(clkin: in std_logic;
...
-2
votes
0
answers
28
views
Arithmetic progression [closed]
Design a circuit to generate the arithmetic progression with the ratio r = 3 and the first term a1 = 1. The current number should be displayed in 7 segments. If the string exceeds 4 digits then the ...
-1
votes
0
answers
40
views
VHDL INOUT always read 0 while in read condition? (tri state condition)
Could someone please help me with the following?
To try and learn VHDL I've created a small IO IP block with an lite AXI interface for use with the microblaze softcore.
If im not mistaken you need to ...
-1
votes
0
answers
19
views
VHDL- out change after 1 sec [closed]
I am trying to do something like that,
When a component outs '0' after 1 sec the output will change to '1' auto.
-1
votes
0
answers
42
views
How to implement the following circuit to a vhdl code?
I have attempted to solve a combination electronic lock and have got the state diagram attached. If the sequence is correct a ‘C’ is displayed and the error state is indicated as ‘E’ on the LCD ...
-2
votes
0
answers
24
views
VHDL: Displaying a Matrix of Blocks with VGA on an FPGA [closed]
I currently have a working VHDL VGA module for an FPGA. It outputs a 640x480 signal at 60Hz.
The module uses a pattern_generator submodule to actually displays things on the screen. This submodule ...
-3
votes
0
answers
39
views
How to write 32 bit 4 stage carry save adder VHDL behavioral model [closed]
It's a 32 bit carry save adder, there are 4 stages each stage has 8 bit input A and B and also carry in .
-1
votes
0
answers
29
views
How to make process in the top_level entity to send a 32 bits in vhdl as MISO?
I am trying to send and receive data from MCU through FPGA to DUT. The point I have designed the system and it is working well on testbench also hardware. However, I am only able to send MOSI from MCU ...
-1
votes
0
answers
27
views
Problem with N-Input AND Gate Testbench in VHDL
I have the following file for an N-Input AND gate:
entity AND_N is
Generic (n: natural := 2);
Port (a: in bit_vector (1 to n);
b: out bit);
end AND_N;
architecture Behavioral of AND_N is
begin
...
0
votes
1
answer
40
views
Best way to define and initialize matrix in VHDL
I'm trying to make a program that uses matrices( 2d arrays) of integers in vhdl and i have never done that before.
First of all, is it possible to define a 2d array in the entity's signal definitions?...
-1
votes
0
answers
53
views
VHDL outputs all 'xxxx' for one specific case
My code has to work in 2 modes, mode 0 works without any problems, however mode 1 starting of the fist if statement implemented just shows xxx. all of the values are input manually in the simulation ...
1
vote
1
answer
34
views
vunit, what are reset conditions between test case
I'm very confused about vunit testing, especially the link between tests and the way they are reset.
Please take a look at next minimal example:
device under test
Device has one inner state that latch ...
0
votes
1
answer
37
views
I can't increment an unsigned number in VHDL
So I tried the main method that I came across on internet and it never worked, I tried many different things but can't seem to make it work. When it is supposed to do the first increment, the unsigned ...
0
votes
1
answer
55
views
how to make a fully generic MUX in VHDL 93
I would like to synthesis a generic MUX with two generics :
addressSize (in number of words)
wordSize (in bits)
This seems fairly easy as per these very similar question : 3459057 and 32562488. The ...
-1
votes
0
answers
46
views
Undefined output after Vivado Behavioral Simulation
I am implementing a cryptographic algorithm in vhdl and I’ve run into a dead end. This algorithm consists of an NLFSR (nlfsr) and an output function (z_function), that are connected as components in ...
-1
votes
0
answers
31
views
VHDL Error 10500 Code syntax errors in quartus (VHDL)
I don't know what I'm doing wrong with this code.
Error (10500): VHDL syntax error at Gate.vhd(17) near text "signal"; expecting "end", or "(", or an identifier ("...
0
votes
1
answer
45
views
VHDL Frequency Meter that reads NCO
<hi guys im trying to make an auto-ranging 4-digit frequency meter for measuring signals with frequencies from
10 Hz to 10 MHz. An external 1 MHz generator is used to provide a clock signal to the ...
1
vote
1
answer
64
views
How to use imported enum in if condition?
In a process I need to do something depending if one of the ports has a specific value. This value is defined in a type def in a separate package file.
The comparison should be done in an 'if-...
-1
votes
0
answers
32
views
wait statement without UNTIL clause not supported for synthesis: i wanted to delay my result by 10 ns seconds but this error keep showing
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity Four_bit_Multiplier is
port
(
Value1: in std_logic_vector(3 downto 0);
Value2: in std_logic_vector(3 ...
-1
votes
0
answers
31
views
VHDL: Are enumerations in multiple type declarations named the same treated as the same value?
See the following simplified code example. The reason for trying to do this is do to reporting on missing FSM transitions to ST1 in return_to_states when return_to_states is of type All_states. Again ...
-1
votes
0
answers
21
views
How to simulate Xilinx XADC in Questa SIM?
Is it possible to simulate Xilinx XADC in Questa Sim 10.6_1 simulator? I like to instantiate the XADC module in the top-level testbench module to overserve the temperature or voltage value.
-1
votes
0
answers
26
views
I tried writing UART VHDL code for loopback testing. Can anyone help me how to write a testbench for it
UART loopback testing code for an FPGA:
--
-- Inputs/Outputs:
--
-- SYS:
-- I_clk - system clock - at least 16x baud rate for recieve
-- but can be less if only ...
0
votes
1
answer
46
views
VHDL Counter mod 60
I need help with this counter mod 60. Please help !
The T60 is the signal when count hit 59, 0 or 1 if is the case. Also when count hit 60, countget reseted to "000000".
When RESET60 is '1', ...
-1
votes
0
answers
43
views
Vivado ALU 8bit subtract
i have an ALU to built with 2 inputs (8 bits) and 1 output (8 bits),also there is a control input <=std_logic that subtract those 2 inputs (input_1 - input_2) for controler<='0' or shift_right(...
1
vote
1
answer
26
views
What is this VHDL 10309 error code all about?
I'm running with 2 projects right now and I have problems with same topics to be fixed - VHDL Interface Declaration error known as ID 10309(Interface object of mode out cannot be read. Change object ...
-1
votes
0
answers
24
views
VHDL How to stop a line executing in process
I am trying to assign a value in process and keep it that way, but the value is changed back into original one every time.
My value is being reassigned to previous one each time and my if statement ...
-1
votes
0
answers
54
views
Signal is used but never assigned. This sourceless signal will be automatically connected to value 0000000000000000
I have to implement a multiplier using VHDL assuming that the multiplicand and multiplier are respectively 8- and 6-bits signed integers.
The diagram consists of several parts.
And here is my code:
...
0
votes
1
answer
24
views
String in VHDL Waveform
How can I print a string in VHDL waveform?
-> like here
-1
votes
0
answers
71
views
How to send 2 different sets of data to simulation using one signal VHDL
I am building SPI master and I need to send 2 data packages to simulation. Here is my code
entity SPI_sas is
Port ( Clock : in STD_LOGIC;
MOSI : in STD_LOGIC;
OutData : out ...
-1
votes
0
answers
36
views
How to assign an initial value to a bit in a vector while at the same time declaring an alias for it?
I have a vector called ctst,
signal ctst : std_logic_vector(19 downto 0);
and I am trying to assign an initial value to each bit of the below signals:
alias SS_DELAY : std_logic_vector(3 downto 0) ...
0
votes
1
answer
35
views
why my shift register show the result in one clock instead of 4?
this is my code for dff and multiplexer and shift register, which should rich the output in 4 clocks but it does it in one clock and I could not fix it myself.
this is my dff code:
use IEEE....
-1
votes
1
answer
30
views
VHDL Question with EDA playground - Illegal non-graphic Character
I am facing with problems with VHDL with EDA playground - Any solutions are welcomed.
design.vhd
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith....
-1
votes
0
answers
35
views
Need to set default output, but it does not work
I got this code to compile and work, but all leds were on constantly. So I decided it needed to be defaulted, which is why I added: "011101111" to output in sensitivity list. Now the code ...
-1
votes
0
answers
32
views
Is there any way to use "IF input doesn't "exist""
I am trying to make a comparator, but I ran into a problem. I have 3 In values, "Set_Period_IN", "Set_Pulse_IN" and "CNT_IN".
I need the comparator to evaluate 2 arrays ...
-1
votes
0
answers
27
views
How can I input values in a testbench connected to a inout port?
I'm trying to set the starting value for my register file (r) in the testbench but when I input the values the simulation only shows UUUUUU. The inout works properly in my ID.vhd file but it doesn't ...
1
vote
0
answers
45
views
How to control routing in Altera Cyclone V FPGA
I am trying to implement a Time-to-Digital Converter on Cyclone V FPGA. I am using Quartus Prime 17.1 lite edition (No license). I have trouble manipulating the placing and routing. The connection ...
-1
votes
0
answers
29
views
Extra clock cycle issue and issues with logic vector to integer conversion
I'm trying to implement pipelining in VHDL but I'm stuck on the Instruction Fetch to Instruction decode part. The issue seems to be with my std_logic_vector to integer conversion. For instance, I ...
-1
votes
0
answers
54
views
VHDL VGA controller gets no output to screen
I'm currently learning VHDL for a class I'm taking and I'm working on a VGA controller. I've been over this code a hundred times and can't seem to find anything wrong, but maybe more eyes would help. ...
0
votes
1
answer
37
views
Can signal in std_logic have other value than 0 and 1?
I've been learning VHDL (mostly on my own) during my studies. I've heard that I should always cover all possible situations in case or if statements. My question is: is it technically possible for ...
-1
votes
0
answers
16
views
7 segment output signal is not correctly and expected, signal after high cant back to low
I created a 7 segment, there will have 4 "ras" with active low, while i am using the if statement to write, all the default input signal are set to active low. And the test bench had been ...
-1
votes
0
answers
47
views
Decoder 3:8 using 2:4 decoder VHDL
I'm trying to make this 3:8 decoder using a 2:4 decoder as component using VHDL on quartus prime 19.1:
Here's the code:
lab02_21 is the 2:4 decoder with an enable
library ieee;
use ieee.std_logic_1164....