R
redstripe
Guest
I am working on a GRAPHICAL design in QuartusII where I have data
represented with the twos complement number system. This is not a
problem as most of the time the data is the same bit width (usually 12)
and I preserve the sign and magnitude.
The problem I am having is in a "simple" VHDL section I am trying to
write. There are times when I want to take the 12 bit twos complement
data and limit it to some smaller value (lets say 6bits). So the input
would be 12 bits and the output would be 6 bits. If the 12 bit number
is within the 6 bits it passes through, otherwise it is limited. I am
very new to VHDL and I assumed this task would be simple.
First, is there any easy way to set a 6bit output equal to a 12bit
input? assuming the 12bit data is within the 6 bits? Every time I try
I run into some sort of error.
The next part would be just checking if the 12bit input is out of the 6
bit range and if it is setting the output to the max/min value.
Any help would be greatly appreciated.
represented with the twos complement number system. This is not a
problem as most of the time the data is the same bit width (usually 12)
and I preserve the sign and magnitude.
The problem I am having is in a "simple" VHDL section I am trying to
write. There are times when I want to take the 12 bit twos complement
data and limit it to some smaller value (lets say 6bits). So the input
would be 12 bits and the output would be 6 bits. If the 12 bit number
is within the 6 bits it passes through, otherwise it is limited. I am
very new to VHDL and I assumed this task would be simple.
First, is there any easy way to set a 6bit output equal to a 12bit
input? assuming the 12bit data is within the 6 bits? Every time I try
I run into some sort of error.
The next part would be just checking if the 12bit input is out of the 6
bit range and if it is setting the output to the max/min value.
Any help would be greatly appreciated.