CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 18:07:05 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=08712bc1a1849a557b1afb8b7b293a02d1c61ad2a8433df0d47c61b4b189fceda%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22Aju2jB4B-sFdGJMTXZJv4swqaD7v9lJK%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d04b884f9db155-BLR
module sequential_multiplier #( parameter p_data_width = 4)( output - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module sequential_multiplier #(
- parameter p_data_width = 4
- )(
- output wire [(2*p_data_width-1):0] o_w_out,
- output wire [(p_data_width-1):0] o_w_disp_a,
- output wire [(p_data_width-1):0] o_w_disp_b,
- input wire [(p_data_width-1):0] i_w_a,
- input wire [(p_data_width-1):0] i_w_b,
- input wire i_w_clk,
- input wire i_w_reset,
- input wire i_w_write,
- input wire i_w_multiply,
- input wire i_w_display
- );
- wire l_w_a_we;
- wire l_w_a_oe;
- wire [(p_data_width-1):0] l_w_a_out;
- register #(.p_data_width(p_data_width)) l_m_register_0 (
- .o_w_out(l_w_a_out),
- .o_w_disp_out(o_w_disp_a),
- .i_w_clk(i_w_clk),
- .i_w_reset(i_w_reset),
- .i_w_in(i_w_a),
- .i_w_we(l_w_a_we),
- .i_w_oe(l_w_a_oe)
- );
- wire l_w_b_we;
- wire l_w_b_oe;
- wire [(p_data_width-1):0] l_w_b_out;
- register #(.p_data_width(p_data_width)) l_m_register_1 (
- .o_w_out(l_w_b_out),
- .o_w_disp_out(o_w_disp_b),
- .i_w_clk(i_w_clk),
- .i_w_reset(i_w_reset),
- .i_w_in(i_w_b),
- .i_w_we(l_w_b_we),
- .i_w_oe(l_w_b_oe)
- );
- wire l_w_c_we;
- wire l_w_c_oe;
- wire [(2*p_data_width-1):0] l_w_c_out;
- wire [(2*p_data_width-1):0] l_w_c_in;
- assign l_w_c_in = (l_w_a_out * l_w_b_out);
- register #(.p_data_width(2*p_data_width)) l_m_register_2 (
- .o_w_out(l_w_c_out),
- .i_w_clk(i_w_clk),
- .i_w_reset(i_w_reset),
- .i_w_in(l_w_c_in),
- .i_w_we(l_w_c_we),
- .i_w_oe(l_w_c_oe)
- );
- localparam STATE_INITIAL = 2'd0;
- localparam STATE_WRITE = 2'd1;
- localparam STATE_MULTIPLY = 2'd2;
- localparam STATE_DISPLAY = 2'd3;
- reg [1:0] l_r_state;
- reg [1:0] l_r_next_state;
- always @(posedge i_w_clk) begin
- if(i_w_reset == 1'b0) begin
- l_r_state <= STATE_INITIAL;
- end else begin
- l_r_state <= l_r_next_state;
- end
- end
- always @(*) begin
- l_r_next_state = i_w_write ?
- STATE_WRITE :
- (i_w_multiply ?
- STATE_MULTIPLY :
- (i_w_display ?
- STATE_DISPLAY :
- STATE_INITIAL));
- end
- assign l_w_a_we = l_r_state == STATE_WRITE;
- assign l_w_a_oe = l_r_state == STATE_MULTIPLY;
- assign l_w_b_we = l_r_state == STATE_WRITE;
- assign l_w_b_oe = l_r_state == STATE_MULTIPLY;
- assign l_w_c_we = l_r_state == STATE_MULTIPLY;
- assign l_w_c_oe = l_r_state == STATE_DISPLAY;
- assign o_w_out = l_w_c_out;
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
-
✅ Make $2500 in 20 minutes⭐⭐⭐ 3
JavaScript | 8 sec ago | 0.24 KB
-
⭐⭐⭐Make $15OO in 2O minutesV G⭐⭐
Java | 14 sec ago | 0.10 KB
-
⭐ G2A Bug ⭐ (Get more on BTC swaps) ✅ NEVER S...
JavaScript | 14 sec ago | 0.24 KB
-
⭐⭐Exchange Exploit⭐⭐ 9
JavaScript | 21 sec ago | 0.24 KB
-
⭐✅ Jack's Profit Method ✅ NEVER SEEN BEF...
JavaScript | 23 sec ago | 0.24 KB
-
⭐⭐⭐Make $15OO in 2O minutesV E⭐⭐
Java | 24 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ 6
JavaScript | 30 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $900 INSTANTLY⭐⭐
Java | 36 sec ago | 0.10 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand