Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
82 views

My register doesn't work properly. The output changes simultaneously with the input. There should be a one-cycle delay, but I am not seeing it from the simulation in Modelsim. Does anyone know why? ...
user22714606's user avatar
6 votes
1 answer
119 views

A known problem in VHDL is that using parts of a return statement (e.g to_string(slv(i))'length) will generate a warning/error on compile. To work around an unknown string length, I tried using the ...
Pelle's user avatar
  • 131
0 votes
2 answers
154 views

I'm trying to generate a pulse width modulated signal to control the power with duty cycle, but don't know where I went wrong This is the verilog code module pwm_generator ( input wire clk, ...
Subzee's user avatar
  • 73
0 votes
1 answer
115 views

Sadly, stack wont let me post an image yet...so,for uni i have to recreate a circuit in vhdl code, but when i run it simulate it in Modelsim, all vectors (except input_vector) remain undefined. I get ...
rafas kout's user avatar
-1 votes
1 answer
75 views

I have been working on my desktop using Quartus prime lite and ModelSim, but recently I got a weird error that I can't seem to fix. I have tried restarting my pc, uninstalling and reinstalling Quartus ...
youlexa's user avatar
2 votes
1 answer
60 views

I ran into a problem that buffer in my simulation does not work as I expected. I tried some test and got the following results. I created code in Verilog that generates two buffers in different ways: ...
daniel danino's user avatar
-2 votes
1 answer
163 views

I present the VHDL & SystemVerilog code, of a very simple example. I would like to know if it's possible to do what I am trying. And in case it is, why I am getting an error Considered I am using ...
Edu Fer's user avatar
-1 votes
1 answer
106 views

this is my code for a fun Fire extinguishing system in a 50 unit apartment.this is fire_detection_system.v: module fire_detection_system ( input wire clk, // Clock signal input wire reset, // ...
Rmin's user avatar
  • 1
-1 votes
1 answer
68 views

I'm trying to run a test bench in which the inputs change every 10 ns, so I used command #10 in the testbench code. However, in the wave form, it appears to change every 10 ps. How can I change it?
user1188938's user avatar
0 votes
1 answer
1k views

I have Vivado 2016.4 and Modelsim 2021.3 installed. My Vivado project contains Xilinx ip-cores. I want to model everything in Modelsim. It is useless to choose the Modelsim simulator in the simulation ...
Vladimir Korshunov's user avatar
0 votes
1 answer
203 views

I want to introduce a one-cycle delay to valid_dat by using @(posedge clk) but it doesn't work. The counter works fine with the clock and increases by one every clock cycle. But valid_delay changes ...
user22714606's user avatar
1 vote
1 answer
53 views

The data read from A_arr, B_arr and C_arr are incorrect. The value I have in Moddelsim is not what I defined in the testbench. I have a testbench for my design. It should fetch inputs from A_arr and ...
user22714606's user avatar
-1 votes
1 answer
59 views

I have this code in VHDL: library IEEE; use IEEE.std_logic_1164.all; entity crono is end entity crono; architecture crono of crono is signal x1, x2, x3, s1, s2, s3, s4: std_logic; begin x1 &...
HarryYNG's user avatar
0 votes
1 answer
142 views

I am a digital technology student trying to learn VHDL. I wrote this testbench code for 4 bit bcd adder to 7 segment display I have tried all the possibilities i and chat GPT could think of but the ...
Hammad Karamat's user avatar
0 votes
1 answer
98 views

I have Systemverilog macros for endianess-aware parsing of unpacked data: The purpose of this macro is to take any BYTE_WIDTH Bytes from an BYTE_OFFSET offset at a Byte array, and pack them into a ...
user21700525's user avatar
0 votes
1 answer
104 views

I'm a newbie in VHDL Programming and I am having trouble with this VHDL code (sync counter). The variable Q_AUX_4 is never assigned to the output Q_OUT because when I try to run simulation, using ...
Simone Rossi's user avatar
0 votes
1 answer
270 views

I had existing test benches with icarus verilog. I am exploring questa. The test benches can be called individually or batched. With icarus it provides an extension to have a non-zero return code. ...
artless-noise-bye-due2AI's user avatar
-1 votes
1 answer
142 views

I have an old VHDL code which I need to run a simulation for with Modelsim. This code "includes" a warp around condition which is of no consequence in real hardware but fails in simulation. ...
Carlhermann Schlehaus's user avatar
-1 votes
2 answers
112 views

I'm trying to make this "for" loop work but im stuck with the same error: "Illegal concurrent statement". library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; use ...
HarryYNG's user avatar
3 votes
1 answer
411 views

I am trying to print the graph of this in Modelsim with Verilog This is the code I wrote in Modelsim: module circuit ( input A, input B, input C, input D, output reg F ); always @* begin F = ~(~A &...
Pascal's user avatar
  • 31
0 votes
1 answer
209 views

I've been trying to write VHDL code for a counter. Ultimately, I would like to take the output value, check it with a constant value, and see if the counter has reached the constant value. if it ...
Nima Kolahimahmodi's user avatar
-1 votes
1 answer
679 views

Problem related to Model Sim Questa tool. (System verilog) I have run the code in Questa Sim, then check the schematic of that verilog code. But again I changed something in that code and try to run ...
AWESOMENESS FOREVER's user avatar
0 votes
1 answer
192 views

I'm trying to write a testbench to test my processor using the $display() statement. But I don't know why there are unexpected, there is unexpected or garbage numbers printed on the transcript. This ...
Giannis's user avatar
  • 11
0 votes
1 answer
212 views

I'm currently designing a MIPS based processors in VHDL using Quartus 20.1 along with Modelsim 2020.1. I created a MIF file that (hopefully) calculates the GCD of a given number. My MIF file consists ...
GH051's user avatar
  • 1
1 vote
1 answer
169 views

I am instantiating two components within a top level file, where this implements a Phase Accumulator and LUT with an 8-bit FTW, to essentially create a simple DDS system. Mind you this is very ...
F4N's user avatar
  • 21
-1 votes
1 answer
172 views

I am running a verilog file on Modelsim, however the wave area is empty and displays a "xxxxxx" message. I am very new to Verilog/Modelsim/Quartus in general, any help would be greatly ...
Kenneth Lin's user avatar
0 votes
1 answer
166 views

I am trying to use VHDL concurrent assertions in order to verify that a signal correctly drives another. As they should be directly connected at some times (no latching), I want to use a concurrent ...
crete's user avatar
  • 1
0 votes
1 answer
86 views

module string_l(); string a; initial begin a="Hello"; $display ("@%gns a=%s", $time, a); end endmodule
Meher81's user avatar
  • 163
1 vote
1 answer
445 views

I've made counter in Quartus as schematic file. Then generated Verilog design file from that scheme. I was able to configure and run simulation in Modelsim, but outputs of counter (Q0..Q3) always ...
bibo's user avatar
  • 27
1 vote
1 answer
360 views

I'm trying to open a file and write stuff, simple. My implementation is not so simple. I'm using Verilog/SystemVerilog and Modelsim on the Windows OS. My command line in Modelsim is: set generics &...
Ray H's user avatar
  • 40
0 votes
1 answer
125 views

I am trying to write a 16-bit ALU. I have compiled everything successfully, but when the operation code alu_code changes, the result C stays the same (the first operation result). Here's my code for ...
JarvisLYu1's user avatar
1 vote
1 answer
1k views

I'm currently working on a Verilog project where I'm attempting to run a testbench for a 4x16 decoder using a 2x4 decoder. However, I'm encountering problems with the output. I've provided the code ...
Ankit Kumar Singh's user avatar
0 votes
2 answers
191 views

I have a problem with super.func() call in SV. I have three main classes: class_C extends class_B; class_B extends class_A; class_A; And I have three configuration (aggregate) classes: inner_C extends ...
Андрей Ефимов's user avatar
0 votes
1 answer
400 views

I'm trying to implement a Ping Pong game using VHDL on a Cyclone IV FPGA (EP4CE22) with ModelSim as my simulation tool. I have the basic game logic implemented, but I'm facing an issue with the ...
user avatar
-1 votes
1 answer
508 views

I'm currently working on a final project for my Verilog course, which involves building a processor. As part of the project, I've implemented a state machine to manage different stages of the ...
Yonatan Shkolsky's user avatar
2 votes
2 answers
129 views

I am trying to write Verilog code for I2C master, and there are a couple of problems I am facing. I was able to compile and run its testbench on Quartus and modelsim, respectively. However, I am ...
Qazi Zabeer's user avatar
-1 votes
1 answer
5k views

I am using Ubuntu 22.04 LTS as my OS system. I need to install modelSim for participating Verilog or HDL . But I am failed to do it. How to Install ModelSim in Ubuntu 22.04 ? Is there any terminal ...
Shahrear Al Sakib's user avatar
1 vote
2 answers
258 views

I'm doing a Verilog project on quartus, and when I do the analysis and synthesis, quartus doesn't give me any errors. When instead I try to compile the files on ModelSim, it gives me the following ...
Dev's user avatar
  • 13
1 vote
1 answer
292 views

I'm trying to build a Multiply-Accumulator (MAC) module for Matrix Multiplier with Verilog. Here's Verilog Code for the MAC module: module Multiply_Accumulation(MAC_out, sel, a, b, clk, rstn); //...
DJJJ's user avatar
  • 11
1 vote
2 answers
184 views

I am trying to create a 4-bit ripple carry adder using 4 full adders each comprised of two half-adders. This is the code for my half-adder: module HA (input a, b, output reg cout, output reg ...
Amir Kooshky's user avatar
0 votes
1 answer
78 views

``--! start state logic start_int <= start; ssl_edge_detect_proc: process(start_int,clk) begin if rising edge(start_int) then start_edge_old<='1'; else start_edge_old<='0'; ...
Srikanth's user avatar
2 votes
1 answer
281 views

Here is the minimal reproducible problem: file: top.sv module top(input [31:0] in1, output [31:0] out1); assign out1 = in1; endmodule file top_tb.sv module top_tb; shortreal in1_real; shortreal ...
Rajkumar Ananthu's user avatar
1 vote
2 answers
652 views

I spent quite a long time debugging some Verilog code only to realize that the design was correct the entire time and for whatever reason Verilog's display function was having unexpected behavior. I ...
MFerguson's user avatar
  • 1,777
1 vote
2 answers
849 views

I have the following Verilog file named main.v: module m1(input a, b, output wire c); assign c = a & b; endmodule module main(input x, y, output wire z); wire k; m1 m1_inst(.a(x), .b(y), .c(k))...
Ahsan Ali's user avatar
  • 411
2 votes
1 answer
166 views

I am getting this error when I am compiling my file which Using Behaviour Modelling is designing a positive edge triggered T-Flip-Flop with asynchronous clear in Verilog code. module t_flip_flop (...
Sai Ganesh K's user avatar
0 votes
0 answers
109 views

I need to find the minimum of 5 s-fixed values, as I have an array of 5 values val3=[x1 x2 x3 x4 x5] and I need to fill another array val33=[y1 y2 y3 y4 y5], while y1 is the minimum value of the array ...
Bilal MEJMAA's user avatar
1 vote
1 answer
509 views

My friend wrote an FSM code that generates 3 numbers (1,4,1) in binary. The code works and compiles in modelsim. I wrote a testbench for it so I can simulate it. The testbench code errors in line 24 ...
rady alz's user avatar
2 votes
2 answers
2k views

I am trying to generate a random number using the $dist_uniform using Quartus and ModelSim. The relevant code section is as follows (within a loop): rand= $dist_uniform(10,20,25); rand_test=$random; '...
shlopkin's user avatar
-1 votes
1 answer
778 views

I am trying to exclude certain vhdl files from my code coverage report, but I can't get it to work. My report always shows all available files. My workflow is as follows: in Modelsim I compile the ...
Hirsch's user avatar
  • 21
-1 votes
1 answer
658 views

I have installed Quartus V20 + ModelSim V20. It's the first time I use that. I have buyed a book to try to understand how to simulate / use a FPGA system. I have done a simple cirtuit to check the ...
user3514930's user avatar
  • 1,717

1
2 3 4 5
16