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.

Using buffer and shifting in VHDL problem

Status
Not open for further replies.

ghattas.akkad

Member level 1
Joined
Apr 30, 2013
Messages
39
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,555
Hello
I am having trouble shifting a Buffer std_logic_vector as it is not shifting and updating the results
the expression is:

Code:
denominator: buffer std_logic_vector(M downto 0);
if(clk'event and clk='1') then		

   if(sld='1') then
      op_denom<=denominator(M-1 downto 0)&'0';
   end if;
end if;

I am using a buffer on denominator and numerator for continuous shifting and storing I will have to check Numerator MSB and Denominator MSB and stop until they are '1'

Code:
MSBone <= denominator(M) and numerator(M);

But in simulation the denominator is not shifting even thought the sld bit is set
 

Why should denominator shift? You are not assigning anything to it.
Avoid using "buffer". You will get into trouble when doing larger designs. Use intermediate signals instead.
 
Code:
denominator <= denominator(M-1 downto 0)&'0';

would be shifting the denominator signal what you were doing is assigning the shifted value of the denominator signal to op_denom, which is completely different.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top