Skip to main content

Questions tagged [verilog]

Verilog is a hardware description language (HDL) maintained by Accellera Systems Initiative and standardized as 'IEEE Standard 1364'.

Filter by
Sorted by
Tagged with
7 votes
1 answer
426 views

I'm learning FPGA development, and this is my first Verilog module - a button bouncer using a state machine. The code works as I expected it to be, but I would like some feedback on the code itself ...
Dang Quang Vinh's user avatar
3 votes
1 answer
155 views

I built this simple blinker in SystemVerilog and would very much like some help to make it better: control.sv ...
K_T's user avatar
  • 163
4 votes
1 answer
110 views

The code is for an I2C master that interacts with an ADC IC (ADS1115). Is there a more practical way of seeing what the internal regs and wires are doing in testbench, without creating a ports for ...
Mister Moron's user avatar
4 votes
1 answer
273 views

For now, I have only implemented a simple I2C protocol where only the master transmits the data. Also there is ack_bit for the I2C Address only. For state 5, i.e.,...
Ayush Mritunjay's user avatar
7 votes
1 answer
298 views

This will be first of many things I will submit during my journey of self (re)learning CPU design. I have ALU implementation for RiscV base instruction. I am not fully sure what I am looking for, but ...
u185619's user avatar
  • 937
3 votes
1 answer
248 views

Question How can I improve my Verilog code? Context Flash Read ID Operation This project is an implimentation of the Read Manufacturer and Device ID (9Fh) operation ...
K_T's user avatar
  • 163
3 votes
1 answer
121 views

I'm working on an SPI in Verilog. I will post what I came up with here. This is an educational project compiled according to the general principle from Wikipedia. There is only one mode - exchange ...
ayr's user avatar
  • 133
2 votes
1 answer
126 views

This is testbench code for a combinational logic circuit with 6 input variables and 6 output variables. The 3 binary HS (hall sensor) input variables are signals given by the BLDC motors' sensors that ...
Mister Moron's user avatar
3 votes
1 answer
172 views

For context, I'm using a maxII epm240 cpld, and I want to be able to program this to FPGAs too. I know I could build this in a typical state machine fashion since a sensored BLDC motor controller is a ...
Mister Moron's user avatar
3 votes
1 answer
106 views

I am working on a module named PinCoordinates that detects when X-axis and Y-axis inputs go high. This will be programmed onto an Altera MAX V CPLD. I am ...
Brandon Higgs-Carr's user avatar
4 votes
1 answer
162 views

I am trying to code a state machine for the given state diagram: I ...
Ervin Ranjan's user avatar
2 votes
1 answer
262 views

The Verilog module describes a ROM memory. An initialization file is needed for the INIT_FILE parameter. Below are Makefile, gtkwave.tcl to launch gtkwave, ...
Artem Shimko's user avatar
1 vote
1 answer
140 views

The module measures input clocks. It requires some reference clock. There can be from one to five input clocks to measure it. Output values are usual unsigned ones. As expected, it should be reset ...
Artem Shimko's user avatar
2 votes
1 answer
320 views

I want some feedback about my code (anything is welcome). It is working, but it feels like a clumsy implementation. Because I am self-learning from a book without an answers section, it becomes ...
Miguel Ortega's user avatar
4 votes
2 answers
666 views

I am designing a very crude general-purpose input/output (GPIO) module to provide IO pin control to a RISC-V (like) architecture microprocessor I am currently playing with. This is the code so far: <...
Agamemnon's user avatar
2 votes
1 answer
93 views

I'm looking to improve my Verilog coding form by reducing utilization and learning any tricks more experienced Verilogers may know. This module takes in a pulse data stream with pulses occurring ...
FillenNaymeer's user avatar
5 votes
1 answer
744 views

I'm an ECE student. My experience in Verilog and FPGAs is mainly from my digital logic design class. To practice Verilog, I decided to implement a controller for Adafruit LED matrices. It interfaces ...
hjkl's user avatar
  • 143
1 vote
1 answer
194 views

On recent comments based fixed modules for FPGAs for generating a pseudo-random bit sequence are presented. The first module generates a bit sequence. The third module speeds up the generation by ...
Drakonof's user avatar
  • 453
4 votes
1 answer
375 views

Heart rate or blink generator. Clocked from the system frequency, but calculated from a constant of 120MHz. Has a prescaler with values 2, 3, 5, 6, for even heart beat / blinking. The IS_DEBUG ...
Drakonof's user avatar
  • 453
2 votes
1 answer
2k views

Modules for FPGAs for generating a pseudo-random bit sequence are presented. The first module generates a bit sequence. The third module speeds up the generation by transferring the bus to, for ...
Drakonof's user avatar
  • 453
3 votes
1 answer
2k views

I have been learning SystemVerilog before I go back to school and decided to try and implement a Carry Lookahead Adder. As far as I can tell, it works correctly though I haven't tested extensively, ...
Carson's user avatar
  • 193
5 votes
2 answers
1k views

This ip core simply generates a sine wave according a .mem file. It is required to specify rom depth equal to number of the sine points, the init file and the data size contained in the file. The ...
Drakonof's user avatar
  • 453
3 votes
1 answer
3k views

I'm trying to learn digital design this summer and currently going through this excercise of creating a 32-bit ALU based on this schematic: Im using the + operator ...
theonetrue2's user avatar
4 votes
1 answer
420 views

There are both a simple byte endian (little and big) order swapper and its testbench. A data stream inputs to the module and is converted to the other endianness by computational logic. ...
Drakonof's user avatar
  • 453
3 votes
1 answer
129 views

Module for generating a PWM signal. The req_value_i input gets a duration value of the signal. Furthermore, the module can be stopped by deassertion of the enable_i input. ...
Drakonof's user avatar
  • 453
2 votes
1 answer
1k views

A Stream Data Generator which can take data from both a file or just a counter. This is needed for me as a testbench component for interfaces which works on one hand as an AXIS slave and on the other ...
Drakonof's user avatar
  • 453
3 votes
1 answer
644 views

I am a beginner in FPGAs, and I am studying Verilog HDL. Could you please check the quality of my code (a shift register)? Any comments are welcome. The shift register serializes parallel from ...
Drakonof's user avatar
  • 453
3 votes
1 answer
903 views

Here is the problem: Verilog code and testbench for detecting the range of the input given number. If input number is between 12 to 49 then output is '1' else '0'. Range should be easily programmable. ...
Teja1221's user avatar
2 votes
1 answer
310 views

I created this project on EDA Playground that builds a variable-width 3-way multiplexer out of 2 variable-width 2-way multiplexers. It will be part of homework that I assign, so I want to follow all ...
Ellen Spertus's user avatar
6 votes
1 answer
342 views

I'll be teaching Computer Architecture at the undergraduate level this fall and want to make sure that my example Verilog code follows best practices. I welcome any suggestions, however minor, for ...
Ellen Spertus's user avatar
6 votes
1 answer
844 views

I wrote my first module in Verilog. The purpose is to maintain two counters and emit signals corresponding to VGA's HSync and VSync, as well as HBlank and VBlank pulses to be used by a video ...
robbie's user avatar
  • 261
6 votes
2 answers
1k views

Any and all comments are welcome in this review. ##Problem I've been doing a lot with numerical integration methods recently and have mostly been programming in Python. But, speedups and FPGAs are ...
auden's user avatar
  • 441
6 votes
2 answers
2k views

I have a more long-term project I'm using to learn FPGA/HDL, and this is first sub-component of it used for testing. I'm targeting Zynq device. I'd like to create a component which creates an image. ...
Maja Piechotka's user avatar
8 votes
2 answers
8k views

I'm an EE student who's taken a a couple digital logic/design courses, but they were focused on schematic representation, so I'm teaching myself Verilog to implement what I've learned. For a basic &...
supershirobon's user avatar
3 votes
2 answers
8k views

This is a 32-bit ALU with a zero flag: ...
u185619's user avatar
  • 937
4 votes
1 answer
413 views

I've set myself the task to write a function that parses Verilog-style number literals. In Verilog, numbers are written like this: 8'b10101100, ...
mcmayer's user avatar
  • 183
7 votes
3 answers
4k views

I'm a new Verilog/HDL programmer, and I'm writing this post to get some feedback from more experienced programmers. My very first task was to divide a clock by eight. I know there are some better ...
Marco's user avatar
  • 390
9 votes
2 answers
7k views

This is one of the first Verilog programs I have written. I have a Xilinx Artix-7 FPGA card. Right now I just have it transmitting an "X" every second. It works, and I can see the result ...
chasep255's user avatar
  • 235
28 votes
2 answers
3k views

This is a simple 4-stage pipeline that partially implements the RV32I ISA. All instructions are supported, except jalr, those relating to memory (...
truecolor's user avatar
  • 281
10 votes
2 answers
3k views

I'm having a hard time figuring out if the code I wrote is purely combinatorial or sequential logic. I'm designing a simple 16-bit microprocessor (will be implemented on a Spartan 6), and I'm new to ...
Shreyas's user avatar
  • 203
9 votes
2 answers
382 views

This particular example is Verilog, but my question is more about the state machine structuring, which would be relevant to both VHDL and Verilog. So if I have a state machine, this one is fairly ...
stanri's user avatar
  • 193