W
Weng Tianxiang
Guest
Here is new definition for keyword "if_2", version 2.
It is developed based on many discussions after my first post: " New keyword "if_2" is suggested for dealing with 2-write port memory."
New keyword "if_2" is used to put m-write and n-read memory module from chip manufactures' toolbox behind HDL language so that with the new keyword "if_2" introduction any m-write and n-read memory module would be fully specified in HDL with very simple coding and without special technique and knowledge about memory module, or instantiated memory module needed for circuit designers. All related complex job is left to synthesizer' manufacturers.
If_2-statement ::
[ if_2_label : ]
if_2 condition then
sequence_of_statements
{ elsif condition then
sequence_of_statements }
[ else
sequence_of_statements ]
end if [ if_2_label ] ;
1. Any assignment statement's target array in sequence_of_statements under an if-2 statement is an independent write to a memory that must be executed, not obeying statement sequence in a process, regardless how many writes to the target array are coded before or after its appearance.
2. Any assignment statement's target non-array signal in sequence_of_statements under an if_2 statement obeys statement sequence in a process.
3. An if-statement under an if_2-statement is treated as an if_2-statement.
4. An if_2-statement can only exist within a clocked process.
Here is a code example to specify a 3-write and 2-read memory module:
p1: process(CLK) is
begin
if CLK'event and CLK = '1' then
if C1 then
An_Array(a) <= D1; -- it is first write to array An_Array
end if;
if_2 C2 then
An_Array(b) <= D2; -- it is the second write to array An_Array
end if;
if_2 C3 then
An_Array(c) <= D3; -- it is the third write to array An_Array
end if;
X <= An_Array(j); -- first read from array An_Array
Y <= An_Array(k); -- second read from array An_Array
end if;
end process;
Especial thanks to the creative response writers who mentioned keyword "if_3", who gave me the specification of Cyclone and has deep discussions with me, and Han from HDL-lab whose implementation of a 8-write and 8-read memory for a CPU chip gave me deep impression long before the new idea is born.
Weng
It is developed based on many discussions after my first post: " New keyword "if_2" is suggested for dealing with 2-write port memory."
New keyword "if_2" is used to put m-write and n-read memory module from chip manufactures' toolbox behind HDL language so that with the new keyword "if_2" introduction any m-write and n-read memory module would be fully specified in HDL with very simple coding and without special technique and knowledge about memory module, or instantiated memory module needed for circuit designers. All related complex job is left to synthesizer' manufacturers.
If_2-statement ::
[ if_2_label : ]
if_2 condition then
sequence_of_statements
{ elsif condition then
sequence_of_statements }
[ else
sequence_of_statements ]
end if [ if_2_label ] ;
1. Any assignment statement's target array in sequence_of_statements under an if-2 statement is an independent write to a memory that must be executed, not obeying statement sequence in a process, regardless how many writes to the target array are coded before or after its appearance.
2. Any assignment statement's target non-array signal in sequence_of_statements under an if_2 statement obeys statement sequence in a process.
3. An if-statement under an if_2-statement is treated as an if_2-statement.
4. An if_2-statement can only exist within a clocked process.
Here is a code example to specify a 3-write and 2-read memory module:
p1: process(CLK) is
begin
if CLK'event and CLK = '1' then
if C1 then
An_Array(a) <= D1; -- it is first write to array An_Array
end if;
if_2 C2 then
An_Array(b) <= D2; -- it is the second write to array An_Array
end if;
if_2 C3 then
An_Array(c) <= D3; -- it is the third write to array An_Array
end if;
X <= An_Array(j); -- first read from array An_Array
Y <= An_Array(k); -- second read from array An_Array
end if;
end process;
Especial thanks to the creative response writers who mentioned keyword "if_3", who gave me the specification of Cyclone and has deep discussions with me, and Han from HDL-lab whose implementation of a 8-write and 8-read memory for a CPU chip gave me deep impression long before the new idea is born.
Weng