Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Recent content by rogger201

  1. R

    Testbench input stimulus

    This was a really helpful response. Although, it only works if i use #2 for reset and repeat(1) @(posedge clock) fro every data stimulus. And gives me the desired waveform.
  2. R

    Testbench input stimulus

    Hello, I am writing a testbench in which I am giving the inputs to my module. These inputs include a clock, reset , data and shift_data value that go to my DUT. I am trying to make use of always begin #1 clock = ~clock; end initial begin reset = 1'b0; //its a negedge triggered block...
  3. R

    [SOLVED] if else statement inside an always block

    I understand. This works as there are only 2 cases. But if i have more than two cases, I will have to use "CASE" which requires its own always block like always @(data_sel) case (data_sel) ... How can I synchronize this with the clock?
  4. R

    [SOLVED] if else statement inside an always block

    Hello, I am using an if else block inside an always @(clock) block. My question is, the if statement is governed by a select and my sensitivity list does not contain this signal as its driven by clock and reset. Is this a correct representation of the code: always @(posedge CLK or negedge...
  5. R

    [SOLVED] Shift register implementation and use of its value

    Hello, Sorry about that. I i will mark this question solved. Thanks for your help.
  6. R

    [SOLVED] Shift register implementation and use of its value

    This is how I have written: parameter input_width = 8; parameter bit_width = 1; //in this case to shift 1 bit at a time input [input_width-1:0] input_data; reg [input_width-1:0] shift_reg; always @(posedge CLK or negedge RST) begin if (!RST) shift_reg <= input_data; else shift_reg...
  7. R

    [SOLVED] Shift register implementation and use of its value

    It does work because I can see it in my simulation. It just takes the previous appended value and appends more 0's to it. I need to do it this way because I cannot add the 'load' signal. I cant have additional inputs so I just load the data on reset itself.
  8. R

    [SOLVED] Shift register implementation and use of its value

    Hello, Thank you so much for your help. I will keep that in mind. I am new to Verilog so this really helped. Another small issue I am facing is that I want my "Shifter" to be variable width; as in the number of 0's being appended to shift_reg is variable (parameterized) . Like shift_reg =...
  9. R

    [SOLVED] Shift register implementation and use of its value

    It works because in every clock I am appending 1 0 to its MSB and always making use of its LSB
  10. R

    [SOLVED] Shift register implementation and use of its value

    I need to use each bit of the input_data in an incrementing manner in every clock cycle. So in 1st clock, I want to make use of input_data[0] in 2nd clock cycle, I want to use input_data[1] ... and so on. The code I have written seems to work by taking the next bit in each clock. Does it seem...
  11. R

    [SOLVED] Shift register implementation and use of its value

    Why? I tried doing this always@(posedge clock) begin if (reset) shift_reg = input_data; else shift_reg = {1'b0, input_data[7:1]}; So all of the data gets loaded in in the first cycle after reset . This way its achieved in one cycle. Either way I want to use the last bit so I just...
  12. R

    [SOLVED] Shift register implementation and use of its value

    Hi! I always want to shift the data. The loading is only necessary on reset. Do we still need a load signal?
  13. R

    [SOLVED] Shift register implementation and use of its value

    Shift register implementation without load signal I want to implement the shift register without the load signal This is the original code always @(posedge clock) begin if (reset) shift_data = 0; else if (load) shift_data = input_data; else shift_data = {1'b0, shift_data[7:1]}...
  14. R

    [SOLVED] Shift register implementation and use of its value

    I desire to implement an operation which uses shifting of data and using the MSB for output side. One data needs to be shifted 1 bit at a time and the MSB of this shifted data needs to be used in every cycle with another input data. I am having an issue with the fact that the MSB bit isnt...

Part and Inventory Search

Back
Top