Reply by HT-Lab September 26, 20192019-09-26
On 26/09/2019 14:36, Weng Tianxiang wrote:
> On Thursday, September 26, 2019 at 2:50:48 AM UTC-7, HT-Lab wrote: >> On 25/09/2019 22:22, Weng Tianxiang wrote:
..
>> >> Hi Weng, >> >> Give it up, your are flogging a dead horse, no new language constructs >> are requires as we already have the correct simulation and synthesis >> models for decades. >> >> If you have lots of dual port memories to connect use a Generate statement. >> >> Regards, >> Hans >> www.ht-lab.com > > Hans, > > Here is an excellent paper dealing with the situation: efficient multi-port memory with FPGA, http://www.eecg.toronto.edu/~steffan/papers/laforest_fpga10.pdf. > > I appreciate the paper very much. I know there is a solution to 2-write memory, but simple "if_2" is a simple solution to inferring to the method. > > Weng
Hi Weng, Yes I know that paper quite well and have used the XOR variant in one of my x86 processors (4W8R). I had no problems implementing it, the standard method is simple and straightforward. As others have told you multi port memories are well established and understood in our community, there is no need for a special keyword. Regards, Hans www.ht-lab.com
Reply by KJ September 26, 20192019-09-26
On Thursday, September 26, 2019 at 9:36:46 AM UTC-4, Weng Tianxiang wrote:

> > Here is an excellent paper dealing with the situation: efficient multi-port memory with FPGA, http://www.eecg.toronto.edu/~steffan/papers/laforest_fpga10.pdf. > > I appreciate the paper very much. I know there is a solution to 2-write memory, but simple "if_2" is a simple solution to inferring to the method. >
If_2 is not the solution to inferring the method by LaForest and Steffan. In a nutshell, what they describe is the bolded text in section 5 (LVT-Based Multiported memories) where it clearly says "Our approach comprises banks of replicated block RAMs where a mechanism of indirection...". They are not claiming to implement something that implements the two write port hardware description that you presented. There would still need to be code written to implement the LVT approach in order to describe that LVT design. Once that code is written, one would have a multi-port design that one could reuse but it would use more logic/memory resources than just a memory. If you think the LVT based approach is worth using for your design, then write the code to implement an LVT based memory design. Trying to propose 'if_2' as being some way to implement LVT (or some other alternative approach) is quite naive on your part. Kevin Jennings
Reply by Rick C September 26, 20192019-09-26
On Thursday, September 26, 2019 at 9:36:46 AM UTC-4, Weng Tianxiang wrote:
> On Thursday, September 26, 2019 at 2:50:48 AM UTC-7, HT-Lab wrote: > > On 25/09/2019 22:22, Weng Tianxiang wrote: > > > On Wednesday, September 25, 2019 at 12:34:13 PM UTC-7, KJ wrote: > > >> On Wednesday, September 25, 2019 at 2:07:45 PM UTC-4, Weng Tianxiang wrote: > > .. > > > p1: process(CLK) is > > > begin > > > if CLK'event and CLK = '1' then > > > if C1 then > > > An_Array(a) <= D1; > > > 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; > > > end if; > > > end if; > > > end process; > > > > > > Using the new suggested keyword "if_2" in VHDL, everybody would like it, not having repeatedly to write a 2-write-port memory for different FPGA chip. > > > > > > In my design there are more than 10 arrays need 2-write port memory. > > > > > > Weng > > > > > > > Hi Weng, > > > > Give it up, your are flogging a dead horse, no new language constructs > > are requires as we already have the correct simulation and synthesis > > models for decades. > > > > If you have lots of dual port memories to connect use a Generate statement. > > > > Regards, > > Hans > > www.ht-lab.com > > Hans, > > Here is an excellent paper dealing with the situation: efficient multi-port memory with FPGA, http://www.eecg.toronto.edu/~steffan/papers/laforest_fpga10.pdf. > > I appreciate the paper very much. I know there is a solution to 2-write memory, but simple "if_2" is a simple solution to inferring to the method. > > Weng
You have provided a keyword, "if_2" and a code example which is not logically correct. I don't see how your keyword solves anything. First, you need to define exactly what the keyword does, which I assume is the same as "if". Then you need to use examples which are logically correct. Then perhaps you can explain why your new keyword accomplishes something that the existing keyword doesn't do already. It sure seems like you are trying to solve a problem that doesn't exist. Certainly your initial premise that dual write port RAMs must be instantiated is not correct. Dual write port RAMs can be inferred as shown in the info I linked to in the other thread. -- Rick C. + Get 2,000 miles of free Supercharging + Tesla referral code - https://ts.la/richard11209
Reply by Weng Tianxiang September 26, 20192019-09-26
On Thursday, September 26, 2019 at 2:50:48 AM UTC-7, HT-Lab wrote:
> On 25/09/2019 22:22, Weng Tianxiang wrote: > > On Wednesday, September 25, 2019 at 12:34:13 PM UTC-7, KJ wrote: > >> On Wednesday, September 25, 2019 at 2:07:45 PM UTC-4, Weng Tianxiang wrote: > .. > > p1: process(CLK) is > > begin > > if CLK'event and CLK = '1' then > > if C1 then > > An_Array(a) <= D1; > > 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; > > end if; > > end if; > > end process; > > > > Using the new suggested keyword "if_2" in VHDL, everybody would like it, not having repeatedly to write a 2-write-port memory for different FPGA chip. > > > > In my design there are more than 10 arrays need 2-write port memory. > > > > Weng > > > > Hi Weng, > > Give it up, your are flogging a dead horse, no new language constructs > are requires as we already have the correct simulation and synthesis > models for decades. > > If you have lots of dual port memories to connect use a Generate statement. > > Regards, > Hans > www.ht-lab.com
Hans, Here is an excellent paper dealing with the situation: efficient multi-port memory with FPGA, http://www.eecg.toronto.edu/~steffan/papers/laforest_fpga10.pdf. I appreciate the paper very much. I know there is a solution to 2-write memory, but simple "if_2" is a simple solution to inferring to the method. Weng
Reply by KJ September 26, 20192019-09-26
On Wednesday, September 25, 2019 at 5:22:34 PM UTC-4, Weng Tianxiang wrote:
> On Wednesday, September 25, 2019 at 12:34:13 PM UTC-7, KJ wrote: > > On Wednesday, September 25, 2019 at 2:07:45 PM UTC-4, Weng Tianxiang wrote: > > I prefer for VHDL grammar to introduce a new statement, specifying an if statement is a second write to an array.
'I prefer' is not justification. One needs to provide objective, measurable improvement. 'I prefer' doesn't do it.
> Here is a code example on how to introduce such statement:
Yet your example by one measure shows how your new method is worse. Rather than simply typing 'if', now one types 'if_2'. How is that better? The same simulation and synthesis results would occur but now any designer is typing more to achieve the same...sort of unproductive don't you think? The language gets more complex and produces no objective benefit to anyone...not the sort of change that benefits.
> > Using the new suggested keyword "if_2" in VHDL, everybody would like it, not having repeatedly to write a 2-write-port memory for different FPGA chip. >
Everybody? How about anybody besides you? Who are these people that "repeatedly to write a 2-write-port memory" rather than writing it once? Those people need to learn how design should be done.
> In my design there are more than 10 arrays need 2-write port memory. >
This statement simply demonstrates your total lack of ability in design. If you're writing the same thing 10 times you're doing it the wrong way. Kevin Jennings
Reply by HT-Lab September 26, 20192019-09-26
On 25/09/2019 22:22, Weng Tianxiang wrote:
> On Wednesday, September 25, 2019 at 12:34:13 PM UTC-7, KJ wrote: >> On Wednesday, September 25, 2019 at 2:07:45 PM UTC-4, Weng Tianxiang wrote:
..
> p1: process(CLK) is > begin > if CLK'event and CLK = '1' then > if C1 then > An_Array(a) <= D1; > 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; > end if; > end if; > end process; > > Using the new suggested keyword "if_2" in VHDL, everybody would like it, not having repeatedly to write a 2-write-port memory for different FPGA chip. > > In my design there are more than 10 arrays need 2-write port memory. > > Weng >
Hi Weng, Give it up, your are flogging a dead horse, no new language constructs are requires as we already have the correct simulation and synthesis models for decades. If you have lots of dual port memories to connect use a Generate statement. Regards, Hans www.ht-lab.com
Reply by Weng Tianxiang September 25, 20192019-09-25
On Wednesday, September 25, 2019 at 12:34:13 PM UTC-7, KJ wrote:
> On Wednesday, September 25, 2019 at 2:07:45 PM UTC-4, Weng Tianxiang wrote: > > > > I never said that: "So, you want someone else to run a VHDL simulator for you in order to save you a lot of energy, cost and time?" > > > I paraphrased slightly, but yes you did say that. Read your original post which I quoted you on. > > > I will do the simulation by myself to determine if the algorithm is correct. > > Cool. > > > > And I will let others to test if the code implementation on either a Xilinx chip or an Altera chip is working. > > > Beyond a superficial, quick code review, why would anyone want to do that? > > > A 2 write port memory is a mature technique and I don't have to spend a lot of time to do it myself. > > > And yet here you are, writing up your own code for two write port memory which you say "is a mature technique". That's pretty much the definition of re-inventing the wheel. > > Kevin Jennings
KJ, I prefer for VHDL grammar to introduce a new statement, specifying an if statement is a second write to an array. Here is a code example on how to introduce such statement: Here is a code segment showing method, doing 2 writes to an array with 2 different addresses on the same cycle: p1: process(CLK) is begin if CLK'event and CLK = '1' then if C1 then An_Array(a) <= D1; 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; end if; end if; end process; Using the new suggested keyword "if_2" in VHDL, everybody would like it, not having repeatedly to write a 2-write-port memory for different FPGA chip. In my design there are more than 10 arrays need 2-write port memory. Weng
Reply by KJ September 25, 20192019-09-25
On Wednesday, September 25, 2019 at 2:07:45 PM UTC-4, Weng Tianxiang wrote:
> > I never said that: "So, you want someone else to run a VHDL simulator for you in order to save you a lot of energy, cost and time?" >
I paraphrased slightly, but yes you did say that. Read your original post which I quoted you on.
> I will do the simulation by myself to determine if the algorithm is correct.
Cool.
> > And I will let others to test if the code implementation on either a Xilinx chip or an Altera chip is working. >
Beyond a superficial, quick code review, why would anyone want to do that?
> A 2 write port memory is a mature technique and I don't have to spend a lot of time to do it myself. >
And yet here you are, writing up your own code for two write port memory which you say "is a mature technique". That's pretty much the definition of re-inventing the wheel. Kevin Jennings
Reply by Weng Tianxiang September 25, 20192019-09-25
On Wednesday, September 25, 2019 at 10:47:04 AM UTC-7, KJ wrote:
> On Wednesday, September 25, 2019 at 1:31:35 PM UTC-4, Weng Tianxiang wrote: > > On Wednesday, September 25, 2019 at 9:00:37 AM UTC-7, Rick C wrote: > > > On Tuesday, September 24, 2019 at 2:49:14 PM UTC-4, Weng Tianxiang > > > > I just want that the code can be simulated by Mentor simulator to prove that my algorithm on a universal subject is working IN THEORY: with 2 write ports for an array, everything is working. By doing so it will save me a lot of energy, cost and time. > > So, you want someone else to run a VHDL simulator for you in order to save you a lot of energy, cost and time? Ummm...why, are you being lazy? I can pretty much guarantee that any VHDL simulator will properly execute the code that you've written per the VHDL language standard. Whether that code performs the function that you would like it for your "algorithm on a universal subject" is up to you to decide. Best of luck on your new endeavors. > > Kevin Jennings
Hi KJ, I never said that: "So, you want someone else to run a VHDL simulator for you in order to save you a lot of energy, cost and time?" I will do the simulation by myself to determine if the algorithm is correct. And I will let others to test if the code implementation on either a Xilinx chip or an Altera chip is working. A 2 write port memory is a mature technique and I don't have to spend a lot of time to do it myself. Thank you. Weng
Reply by KJ September 25, 20192019-09-25
On Wednesday, September 25, 2019 at 1:31:35 PM UTC-4, Weng Tianxiang wrote:
> On Wednesday, September 25, 2019 at 9:00:37 AM UTC-7, Rick C wrote: > > On Tuesday, September 24, 2019 at 2:49:14 PM UTC-4, Weng Tianxiang=20 >=20 > I just want that the code can be simulated by Mentor simulator to prove t=
hat my algorithm on a universal subject is working IN THEORY: with 2 write = ports for an array, everything is working. By doing so it will save me a lo= t of energy, cost and time.=20 So, you want someone else to run a VHDL simulator for you in order to save = you a lot of energy, cost and time? Ummm...why, are you being lazy? I can= pretty much guarantee that any VHDL simulator will properly execute the co= de that you've written per the VHDL language standard. Whether that code p= erforms the function that you would like it for your "algorithm on a univer= sal subject" is up to you to decide. Best of luck on your new endeavors. Kevin Jennings