E
eddie
Hi Group,
I'm trying to find a way to input and output multiple m bit signals
from an FPGA, where m is a very large number. The design is a (not
quite) serial to parallel in and a parallel to serial out module.
let's say that input is a 32 bit wide signal, inputOne is a 256 bit
wide signal.
inputCounter counts from 0 to 7, inputNumber counts from 0 to 3.
inputCounter counts if input is enabled. inputNumber counts if
inputCounter reaches 7 and input is enabled.
My question is whether I can provide a generate statement or
synthesisable function to provide the following: arbitrary numbers of
input/output groups, with an arbitrary serial width, and an arbitrary
parallel width.
I'd like to drive logic creation with the following numbers:
width of parallel bus,
width of 'serial' bus,
number of inputs,
number of outputs,
number of input serial 'slices'
number of output serial 'slices'
number of bits for inputNumber, inputGroup, outputNumber, outputGroup
counters
Is there a way of writing inputOne( variable1 downto variable2 ) <=
input ?
Can I find a way to produce the following in some kind of code
generating loop?
Are there guidelines for writing synthesisable functions, or is this
vendor specific in the main?
thanks
Edward Watts
PS Currently my code looks something like:
process( clk )
--reset code here
if clk'event and clk = '1' then
if some_IO_condition = '1' then
-- do stuff
elsif inputing = '1' then
if inputNumber = "00" then
if inputCounter = "000" then
inputOne( 31 downto 0 ) <= input;
elsif inputCounter = "001" then
inputOne( 63 downto 32 ) <= input;
--...
elsif inputCounter = "111" then
inputOne( 255 downto 224 ) <= input;
end if;
elsif inputNumber = "01" then
if inputCounter = "000" then
inputTwo( 31 downto 0 ) <= input;
elsif inputCounter = "001" then
--...
end if;
elsif inputGroup = "10" then
--...
elsif inputGroup = "11" then
--...
end if;
elsif outputting = '1' then
if outputNumber = "00" then
if outputCounter = "000" then
output_internal <= output( 31 downto 0 );
elsif outputCounter = "001" then
--...
end if;
end if;
end if;
end if;
end process;
I'm trying to find a way to input and output multiple m bit signals
from an FPGA, where m is a very large number. The design is a (not
quite) serial to parallel in and a parallel to serial out module.
let's say that input is a 32 bit wide signal, inputOne is a 256 bit
wide signal.
inputCounter counts from 0 to 7, inputNumber counts from 0 to 3.
inputCounter counts if input is enabled. inputNumber counts if
inputCounter reaches 7 and input is enabled.
My question is whether I can provide a generate statement or
synthesisable function to provide the following: arbitrary numbers of
input/output groups, with an arbitrary serial width, and an arbitrary
parallel width.
I'd like to drive logic creation with the following numbers:
width of parallel bus,
width of 'serial' bus,
number of inputs,
number of outputs,
number of input serial 'slices'
number of output serial 'slices'
number of bits for inputNumber, inputGroup, outputNumber, outputGroup
counters
Is there a way of writing inputOne( variable1 downto variable2 ) <=
input ?
Can I find a way to produce the following in some kind of code
generating loop?
Are there guidelines for writing synthesisable functions, or is this
vendor specific in the main?
thanks
Edward Watts
PS Currently my code looks something like:
process( clk )
--reset code here
if clk'event and clk = '1' then
if some_IO_condition = '1' then
-- do stuff
elsif inputing = '1' then
if inputNumber = "00" then
if inputCounter = "000" then
inputOne( 31 downto 0 ) <= input;
elsif inputCounter = "001" then
inputOne( 63 downto 32 ) <= input;
--...
elsif inputCounter = "111" then
inputOne( 255 downto 224 ) <= input;
end if;
elsif inputNumber = "01" then
if inputCounter = "000" then
inputTwo( 31 downto 0 ) <= input;
elsif inputCounter = "001" then
--...
end if;
elsif inputGroup = "10" then
--...
elsif inputGroup = "11" then
--...
end if;
elsif outputting = '1' then
if outputNumber = "00" then
if outputCounter = "000" then
output_internal <= output( 31 downto 0 );
elsif outputCounter = "001" then
--...
end if;
end if;
end if;
end if;
end process;