Questions tagged [rtl]

Register Transfer Level (RTL) is a logic design abstraction where digital circuits are described in terms of storage elements (registers) and the combinatorial logic operations that occur between them. RTL is one technique of describing a digital system using hardware description languages such as VHDL and Verilog.

Filter by
Sorted by
Tagged with
0 votes
1 answer
42 views

Is there a way to make the Verilog port declaration based on a macro value?

Basically, what I am trying to achieve is that, There is a macro REG_COUNT. Based on the value inside the macro, the N number registers get initialized. But I also want to create dedicated output ...
Vasant Joseph's user avatar
1 vote
2 answers
76 views

Is it possible to pass random values into SystemVerilog module parameter?

I'm trying to pass a random value using $urandom into a parameter for a top level module in my testbench. I get the error: ...
Ronan's user avatar
  • 13
2 votes
3 answers
81 views

What does it mean for a digital logic signal to qualify another signal?

The wishbone specification refers to signals being qualified by other signals: The strobe output [STB_O] indicates a valid data transfer cycle. It is used to qualify various other signals on the ...
Barabas's user avatar
  • 21
0 votes
1 answer
37 views

Discrepancy between simulation results and RTL viewer in Quartus II 18.0 for my Verilog code

Here's the Verilog code for my UsedBeforeAssign module: ...
Tokubara's user avatar
  • 125
0 votes
1 answer
84 views

Understanding decode stage of x86 fetch-decode-execute pipeline and its (lack of) register requirements

FDE pipeline has register requirements for the F & D stages: For fetching an instruction from memory, the instruction pointer register points to the memory location of the next instruction to be ...
computegirl314's user avatar
2 votes
1 answer
203 views

Multiplication in VHDL by a fraction

I am trying to multiply a 8-bit number with 5/7 in VHDL language. I wrote 5/7 as a 20-bit binary and stored the multiplication in a 10-bit variable by only taking first 10-bit numbers of the result. ...
Zzz's user avatar
  • 39
1 vote
1 answer
783 views

What are W1C and R1C register access types?

I drew a diagram for the W1C and R1C register access types for register file/bank. First I am trying to make a register file for different registers. I am using D-FF to store 1-bit data, but I'm ...
P Ksagar's user avatar
0 votes
1 answer
88 views

VHDL: Testbench for ASK modulator

I've been trying to learn VHDL recently and came across the following tutorial for an ASK modulator: https://surf-vhdl.com/implement-digital-ask-modulator-vhdl/ I tried writing a testbench for this ...
user1397215's user avatar
0 votes
0 answers
31 views

How to manage address space data for multiple RTL modules that contain memory mapped slave ports?

A project contains multiple RTL modules with each having one or more memory mapped slave ports. Each module has a set of registers that can be accessed using this. There are read-only registers, those ...
quantum231's user avatar
  • 11.6k
0 votes
0 answers
74 views

Rationale for cascading skid buffer

My questions are specifically related to this short article titled "Designing Skid Buffers for Pipelines" from chipmunk. I understand the basic issue that for the valid/ready handshake to ...
quantum231's user avatar
  • 11.6k
1 vote
1 answer
147 views

Mitigating structural hazards in register files in processor pipelines

I am reading about structural hazards in pipelined architecture in processors. In classic RISC pipeline one such hazard is when we write and read simultaneously to same register, which may cause ...
Meenie Leis's user avatar
  • 2,762
2 votes
1 answer
87 views

How to rewrite the following code using a for loop in Verilog?

Is it possible to write the following code using a for loop in Verilog? ...
eldenlord9394's user avatar
3 votes
2 answers
130 views

Should HDL code be modified with delays if post-synthesis simulation is not expected?

I'm very interested in but pretty new to hardware development. I have designed a 101 sequence detector using the Verilog language, but I saw a difference in behaviour simulation and post-synthesis ...
xc wang's user avatar
  • 167
0 votes
1 answer
114 views

Performance metrics for a VHDL/Verilog RTL design

Correctness and performance is everything in programming. Verifying it for software is relatively easy because you can "just" run the program and see if it crashes and/or is very slow. ...
Stand with Gaza's user avatar
2 votes
1 answer
86 views

Verilog coding guidance for operations in different cycles

I want to do 3 operations in 3 different clock cycles: data in, addition and multiplication, and then repeat. Can anyone give me a Verilog template to implement the above? Something like this ...
eldenlord9394's user avatar
3 votes
1 answer
152 views

Verilog generate block error

I have a CORDIC module that I want to instantiate/generate 8 times, basically, I need 8 blocks of CORDIC. So, I have wrote the following statement block, but I get an error: Error: Syntax error near ...
eldenlord9394's user avatar
3 votes
2 answers
1k views

Reading a file in Verilog

I want to read a file in Verilog that contains both positive and negative numbers. For example, the file contents are: -4 20 28 -52 and so on. Also, after reading ...
blackblade's user avatar
0 votes
2 answers
134 views

What is the correct unit to specify throughput of an RTL block? [closed]

There does not seem to be an agreed way to calculate throughput for digital circuit design which is confusing. I am talking about front end design i.e RTL coding. The data rate can be represented as ...
quantum231's user avatar
  • 11.6k
2 votes
1 answer
553 views

Hardware implementation of Verilog Block & Non-blocking FSM

I'm doing a FSM question from here: https://hdlbits.01xz.net/wiki/Fsm1s I have implemented 2 different FSM using non-blocking and blocking for this question. Non-blocking: ...
Yee Yang Tan's user avatar
2 votes
1 answer
230 views

Why is the number of instances shown in the RTL viewer and technology map (post-fit) different in Quartus Prime Lite?

I am a beginner in using FPGA and Quartus Prime Lite. I created a 32-bit adder using four 8-bit adders. These 8-bit adders were created using eight full adders. I did the design using schematic .BDF ...
kalana sanhinda jayalath's user avatar
0 votes
1 answer
155 views

FPGAcontrolling VGA: why does the monitor show a right triangle and not an isosceles one?

I'm trying to draw on a monitor by using an FPGA (SPARTAN 3A) and by considering a monitor with 640x480@60 Hz of resolution. In my code, I would like to start from a certain pixel (320,190) and to ...
sun's user avatar
  • 13
0 votes
1 answer
515 views

RTL to Gate Level Design - Verilog

I have written the following code for sinc3 flter in verilog (Vivado). I need to ask how shall I now convert this RTL design to a logic Gate level design in verilog (add AND, NOR, flip flops, etc.)? ...
Param Khurana's user avatar
1 vote
1 answer
1k views

SystemVerilog Mux design with "always_comb and tri state variables"

Here is my code for a mux inside an always_comb block. I'm designing a mux with combinatorial logic where I use the shortened ...
nebuchadnezzar_II's user avatar
0 votes
2 answers
585 views

Concatenation with non-blocking assignment

I'm teaching myself Verilog with HDLbits and tackling this problem. According to this post, assignment with the LHS of the expression as a concatenation should work. In practice I've used this many ...
Michael's user avatar
0 votes
1 answer
93 views

How to see the conections in a decoder Quartus II web edition

I have a decoder whos 16 bit output is conecting to a one bit input. Acording to my knowldge of the design it would make sense. How can i know which output port of the decoder is conecting to that ...
Daniel Melo Avila's user avatar
1 vote
3 answers
310 views

How to check if all the signals used have been reset in a VHDL process?

I sometimes make mistake when changing VHDL code to add new functionality that, the new signals added into the VHDL process are not reset when the reset state is asserted. This mistake could be quite ...
quantum231's user avatar
  • 11.6k
4 votes
1 answer
1k views

Is it a good practice to put assertion statements into VHDL RTL code to aid in simulation?

There is something called Assertion based testbenches. I am not aware of what they are or if they are possible in VHDL. But in any case, is it a good practice to sprinkle assertion statements in RTL ...
quantum231's user avatar
  • 11.6k
1 vote
2 answers
638 views

Techniques to develop software and hardware of a SoC in parallel

Hardware development takes a lot of time to develop. If a company is building a System-on-chip (SoC), the RTL model of the SoC is only available after the RTL integration is complete. This requires ...
Shashank V M's user avatar
  • 2,289
0 votes
1 answer
484 views

Is there any reason why the Design Compiler does not optimize a path which it can optimize in a submodule

I have an issue in timing slack got from Design Compiler (DC.) One path Reg2reg in my submodule just was fine, but that path is found to be longer in the top module. It seems that the path was not ...
Slack's user avatar
  • 17
4 votes
1 answer
1k views

When to set defaults for VHDL generics

VHDL generics can have a default value. The rules for how they are overridden in instantiations and declarations seems to be rather complex, so I wanted to ask about the easiest and safest practices ...
P2000's user avatar
  • 3,117
1 vote
2 answers
113 views

How to hash map known values to smaller data width?

Story: I have an input bus of 17b = 131 072 values. An output bus of 10b = 1024 values. Among all the 131 072, only 20 000 values are used and known in advance. I'd like to map all those 20 000 values ...
Alexis's user avatar
  • 357
3 votes
0 answers
221 views

Fan out of TTL Circuit

In this image When calculating the fan out of the TTL circuit the current in the TTL drive output is 16mA and is divided into the emitters of the load each emitter has 1.6mA because the fan out is 10. ...
Ahmed Redwan's user avatar
0 votes
4 answers
560 views

Are Verilog and VHDL Register Transfer Languages?

I have seen the term Register Transfer Language being used as the expansion of RTL in the context of Hardware Description Languages (HDLs). Specifically over here: https://www.cl.cam.ac.uk/teaching/...
Shashank V M's user avatar
  • 2,289
0 votes
0 answers
42 views

Place cells certain distance apart using Design compiler (DC)

So as an example for self-learning, I am trying to place two Flip Flops (FFs) at a certain distance apart. Except for these two FFs which must be at a certain distance apart, other cells might occupy ...
zzzz za's user avatar
0 votes
1 answer
749 views

How to build large demultiplexers using SystemVerilog?

Note: This question about demultiplexers is similar to but not identical to this question which is about multiplexers. I want to build a fully parameterisable demultiplexer in SystemVerilog. So far, I ...
Shashank V M's user avatar
  • 2,289
0 votes
1 answer
2k views

How to build large multiplexers using SystemVerilog?

Note: This question about multiplexers is similar to but not identical to this question which is about demultiplexers. I want to build a fully parameterisable multiplexer in SystemVerilog. So far, I ...
Shashank V M's user avatar
  • 2,289
1 vote
1 answer
562 views

How do I build and simulate a T Flip-Flop without a reset in SystemVerilog?

I found that I could not get a T Flip-Flop without a reset to simulate in SystemVerilog, but I could get a JK Flip-Flop without a reset to simulate. This is because I can set a JK Flip-Flop to a known ...
Shashank V M's user avatar
  • 2,289
-1 votes
1 answer
2k views

Unable to simulate a JK Flip-Flop using VHDL dataflow modelling

I want to write code and simulate waveforms for flip flops strictly using dataflow modelling. In this case I'm simulating a jk flip flop with only j,k and clock (no set , reset). It compiles fine, but ...
Ayush Sinha's user avatar
1 vote
2 answers
775 views

Does it make sense to use a clock input for combinational logic?

Today, I came across this problem on QuickSilicon's RTL Hackathon. It was to design an Endian converter. The requirements were The output should be available in the same cycle The module should ...
Shashank V M's user avatar
  • 2,289
1 vote
1 answer
5k views

How to implement Clock Gating Style RTL into synthesis?

I'm studying to implement a Clock Gating in RTL. So I've followed as the below https://www.design-reuse.com/articles/23701/power-analysis-clock-gating-rtl.html ...
Carter's user avatar
  • 581
1 vote
1 answer
124 views

Test bench when design is pipelined

I have a design with chained modules. Each of them is a pipelined design, so the output in each of them take more than 1 clock cycle. To perform the test bench, I have created so many registered ...
Diego Ruiz's user avatar
1 vote
2 answers
189 views

ALU result is 0, how to fix this?

In system-verilog I am trying to build a small ALU unit which takes a and calculates the negative value of it (-1) in a CPU. I wrote: ...
josh's user avatar
  • 11
0 votes
2 answers
503 views

Is (BC + AD)<<16 equivalent to (BC << 16) + (AD <<16)?

Is the expression (BC + AD)<<16 equivalent to (BC << 16) + (AD <<16)? From some examples which I tried it seems to be true but not sure at all
MrCalc's user avatar
  • 135
0 votes
1 answer
296 views

Difference between Gate Instantiation and SystemVerilog operator

Today I learned about & and ! operators. But I can't understand what is the difference between these two: A=B & C; AND(...
White Force's user avatar
2 votes
0 answers
354 views

Synopsys Design Compiler: Setting a maximum critical path delay on sequential circuits

I have a couple of designs written in Verilog that I'm trying to synthesize with Synopsys DC Compiler. Specifically, I would like to maintain a 1ns upper bound on my critical path delay (CPD) on my ...
Natasha A.'s user avatar
1 vote
1 answer
103 views

Unexpected Behavior: i2s L/R clock only works under arbitrary conditions?

I'm new to Verilog (and HDL at all) and working with a Cyclone II EP2C5 Mini Dev Board in Quartus II (version 13sp1 to be compatible with my cheap FPGA). I use the below two modules (one mostly just a ...
Bo Thompson's user avatar
1 vote
1 answer
406 views

hardware software co-simulation in HDL simulator

When we simulate (VHDL) RTL designs in a simulation tool like ModelSim or ActiveHDL e.t.c, we can have a complete visibility of all signals and variables in the design. This goes a great deal in ...
gyuunyuu's user avatar
  • 2,015
2 votes
1 answer
304 views

My RTL viewer replaces NAND gates with AND gates with the inversion bubbles

I want it to show this MUX only with 3 NAND gates and an Inverter. so, I specified NAND gate in the verilog HDL code, but it keeps replacing it with AND gates with inversion bubbles without having a ...
esse non videri's user avatar
0 votes
2 answers
2k views

How to design Gray code synchronous counters of large widths using SystemVerilog?

I want to design a synchronous gray code counter which is 10 bits wide in SystemVerilog. The counter should have an Active HIGH synchronous reset. I know how to design a 3 bit gray code counter like ...
Shashank V M's user avatar
  • 2,289
0 votes
1 answer
298 views

How to decide when to use flop or RAM based fifo?

Trying to figure out what are the tradeoff like power, size when deciding between using a flop or RAM based fifo ? Any known publications ?
egeek's user avatar
  • 109