forast
Junior Member level 3
- Joined
- Mar 10, 2014
- Messages
- 25
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 3
- Activity points
- 216
I'm in need of a bit help regarding pipelining in verilog. I have a register module with enable and asynchronous reset and what I'm trying to do is create a structural model of the first stage. I have coded the register module already but I'm a little stumped on how to start the first part of this, I can show you what it asks and what I currently have. I prefer a little help so I can figure out what I gotta do. I'm just stuck and need something to jump start me.
Here's what I currently have:
I'm trying to do the first stage of pipeline in this module, not sure if it's set up correctly but each A, B, C, and D has 8 bits input into each register then the 5th register is a mode. I'll then instantiate each of the register. Would this be correct?
Question:
Here's what I currently have:
Code:
module register8bit (reset, clk, enable, d, q);
input reset;
input clk;
input enable;
input [7:0] d;
output [7:0] q;
reg [7:0] q;
always @ (posedge clk or posedge reset)
if(reset)
q = 0;
else if (clk == 1)
q = d;
endmodule
I'm trying to do the first stage of pipeline in this module, not sure if it's set up correctly but each A, B, C, and D has 8 bits input into each register then the 5th register is a mode. I'll then instantiate each of the register. Would this be correct?
Code:
`include "register8bit.v"
module pipline (A, B, C, D, mode, clk, avg);
input [7:0] A;
input [7:0] B;
input [7:0] C;
input [7:0] D;
input mode;
input clk;
output avg;
register8bit reg1()
Question:
Code:
Use five (5) register models to create the input registers (used as interface flip-flops to the rest of the circuit, Chap. 5) as shown. Four of the registers are to input the four 8-bit values A to D and only bit 0 of the fifth register is used to input mode. These registers form a 33-bit parallel-load register. (Alternatively, you may use a 33-bit register model).
Last edited: