W
Weng Tianxiang
Guest
Hi,
In my opinion, using a 2-write port memory is a mature technique and its implementation in any chip is never a secret. Hardware designers in HDL often use 2-write port memory in their applications.
To relieve hardware designers from repeatedly writing complex code for a 2-write port memory, I suggest here for full HDL grammar spectrum to introduce a new keyword "if_2" and new "if_2" statement, specifying a new if statement which has everything same as an if statement, but it specifies a second write to an array. Here is a code example on how to introduce such statement:
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" is a new keyword which introduces a second write to an array in its full range, including all "else", "elsif" parts. And "if_2" keyword can only be used in a clocked process.
if_2 C2 then
An_Array(b) <= D2; -- it is a second write to array An_Array
end if;
end if;
end process;
If a 2nd write to an array does not need any condition, the statement can be written as:
if_2 '1' then
An_Array(b) <= D2; -- it is a second write without any condition
end if;
Using the new suggested keyword "if_2" in HDL, everybody would like it, not having repeatedly to write a 2-write-port memory for different FPGA chips.
Weng
In my opinion, using a 2-write port memory is a mature technique and its implementation in any chip is never a secret. Hardware designers in HDL often use 2-write port memory in their applications.
To relieve hardware designers from repeatedly writing complex code for a 2-write port memory, I suggest here for full HDL grammar spectrum to introduce a new keyword "if_2" and new "if_2" statement, specifying a new if statement which has everything same as an if statement, but it specifies a second write to an array. Here is a code example on how to introduce such statement:
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" is a new keyword which introduces a second write to an array in its full range, including all "else", "elsif" parts. And "if_2" keyword can only be used in a clocked process.
if_2 C2 then
An_Array(b) <= D2; -- it is a second write to array An_Array
end if;
end if;
end process;
If a 2nd write to an array does not need any condition, the statement can be written as:
if_2 '1' then
An_Array(b) <= D2; -- it is a second write without any condition
end if;
Using the new suggested keyword "if_2" in HDL, everybody would like it, not having repeatedly to write a 2-write-port memory for different FPGA chips.
Weng