Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
57 views

I usually work with Xilinx FPGA boards. Based on the documentation I've reviewed and the research I've done, I try to avoid using a global reset signal in my designs as much as possible. However, let'...
stackwryd's user avatar
2 votes
1 answer
77 views

I'm implementing a simple ARM7 in Verilog and am currently in the process of creating a simple data memory. I've come up with something like this: // very simple sdata implementation with 1mb~ memory ...
therepanic's user avatar
-1 votes
1 answer
87 views

module te( input a ); reg clk; reg [1:0]d1=2'd3; reg signed [2:0]d2=-3'd3; reg signed [4:0]d3; always @(posedge clk) begin d3<=d1*d2; $display("%b",d3);//01111,how to know the ...
kittygirl's user avatar
  • 2,513
0 votes
0 answers
44 views

`timescale 1ns/1ps module ctrl( output d0, output reg d1, output reg res=1'b1, output reg d3, output reg d4 ); reg [7:0] oper_cnt=8'd0; reg clk; assign d0=clk; always @(...
kittygirl's user avatar
  • 2,513
-1 votes
1 answer
105 views

For context, please look at my attached diagram to see what I am trying to accomplish. Essentially, I want to swap inout wires using a contained hierarchy that will allow me to have more modular RTL ...
Mahmoud Maarouf's user avatar
-3 votes
1 answer
161 views

`timescale 1ns/1ps module m_top ( input GCLK, input [7:0] i_in1, output o_out1, output reg o_out2, inout io_data, output reg[7:0]yy ); assign o_out1=5; initial o_out2=6; task my_task; input a,b; ...
kittygirl's user avatar
  • 2,513
-1 votes
1 answer
73 views

`timescale 1ns/1ps module a( input a, output [7:0]tmp ); reg signed[2:0] m; reg [2:0] n; initial begin m=4; n=4; $display("%f",m);//-4.000000 $display("%f",n);//4.000000 end ...
kittygirl's user avatar
  • 2,513
-6 votes
1 answer
89 views

`timescale 1ns / 1ps module m_top ( input GCLK, output o_out2, inout io_data ); reg [2:0] compare; case(compare) 3'd1:begin assign o_out2=1; end 3'd2:begin assign o_out2=2; end default:begin ...
kittygirl's user avatar
  • 2,513
2 votes
1 answer
82 views

I know a lot of people have asked about when to use assign inside always, but I'm wondering if you actually have to. Is it ok to have a module where you have assign statements, but they are not inside ...
dishcat15's user avatar
0 votes
0 answers
71 views

The instantiation module as below: module second_module( input [7:0] d, output reg [7:0] q ); initial q <= ~d; endmodule The top module as below: module top_module( input [7:0] ...
kittygirl's user avatar
  • 2,513
1 vote
1 answer
79 views

module n; reg [1:0]a, b; initial begin $monitor($time,," monitor ",a); a=1; a<=a+1; #1;//assignment should happen here end endmodule The expect output is: 1 monitor 2 but I got 0 ...
kittygirl's user avatar
  • 2,513
3 votes
1 answer
111 views

I studied Verilog and do my exercises on HDLBits. I came up with a question when trying to solve this problem: https://hdlbits.01xz.net/wiki/Exams/2014_q3fsm I wrote the following codes according to ...
qian li's user avatar
  • 53
1 vote
2 answers
119 views

I have Verilog code like this: module gen_bits(input clk, input clear, input ld, input in, output reg[7:0] out); always @(posedge clk) begin if (clear) out <= 8'b00000000; ...
qian li's user avatar
  • 53
2 votes
1 answer
73 views

I'm trying to parse all Verilog defines I have in a specific file in my Verilog code. I.e. scan through definitions like the following: `define A 3 `define B 5 `define C (A+B) And translate it to a ...
rg ks's user avatar
  • 31
0 votes
0 answers
55 views

I am trying to add a MMIO device to rocket-chip in chipyard and I want to use Tilelink interface. This MMIO device is intended to be a slave and the rocket-core as the master. For this, I created a ...
student_11's user avatar
0 votes
2 answers
148 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
1 vote
1 answer
69 views

I currently need to read 128 8-bit data. After reading 128 data, they are combined into a 1024-bit RAM which is then assigned to dout. The ram_cnt will count from 0 to 65535. When it counts 128 (0~...
Vina's user avatar
  • 27
1 vote
2 answers
78 views

I wrote a module which used the writing method like: always_ff@(posedge clk)begin logic [WIDTH-1:0] signal1; ........ end When I compiled it in VCS, I drove the signal in testbench, and when I ...
genterminal's user avatar
3 votes
1 answer
115 views

This is the Verilog question. I have written the code according to the image, but I'm getting mismatch in the output, can I get some assistance? module add1 ( input a, input b, input cin, output ...
Subzee's user avatar
  • 73
1 vote
1 answer
80 views

I tried to reproduce loadable counter in Vivado 2023.1, but I cannot get expected result. My testbench file is below: `timescale 1ns / 1ps module behav_counter(); reg [7:0] d; reg clk; reg ...
kittygirl's user avatar
  • 2,513
1 vote
1 answer
67 views

I'm working on a Verilog project for the DE10-Lite FPGA board that interfaces with a 3-axis accelerometer over SPI. I have separate SPI modules (spi_ee_config) for each axis: x_info, y_info, and ...
Mayank Neupane's user avatar
2 votes
1 answer
71 views

The SystemVerilog spec describes a scheduler model in Figure 4-1 (p. 67 of IEEE 1800-2023). It describes a number of regions, including an Active region set and a Re-Active region set. Orthogonally, ...
garethw's user avatar
  • 53
1 vote
1 answer
59 views

I need to write a property to check the divisor of a fast clock. I’ve tried the following options: property clk_frequency_P(logic pll_clk, logic destination_clk, logic clk_en, logic reset, int divisor)...
Sarti's user avatar
  • 153
1 vote
1 answer
95 views

For the code below, I utilized a predefined RAM module from Quartus to create the RAM. How do I determine the port order when instantiating it? I understand it must be compatible with the module from ...
mmm's user avatar
  • 11
4 votes
2 answers
137 views

I am trying to run an LED matrix using an FPGA. The specifics are a TinyFPGA BX, wired into this board (driver chip datasheet), connected to this screen. Before this, I managed to drive this matrix ...
dhodul's user avatar
  • 43

1
2 3 4 5
128