-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Thomas A.D. Riley wrote: | It seems from here there are two ways to go: | | 1. somehow steal the implementation that synthesizes "/wire try1 = | (state_en == 5'd8)" into gates, or / | 2. add code that generates valid EDIF netlist elements for LPM_COMPARE | | For our purposes either approach would work; the downstream tools I'm | targeting should handle either output as long as it was valid EDIF | describing a netlist of LPM modules.
| I'm sure Stephen has an opinion about which is the Right Thing to do. | I'm also curious to know why sometimes the comparison gets synthesized | and other times it's handed off for output as a module.
Yep, he does:-)
The Right Thing in this case is to make sure the LPM generator knows how to emit LPM_COMPARE objects. Comparing with constants may sometimes be optimized into something else, but comparison with variables will not in general be substituted. So handling LPM_COMPARE is necessary in any case.
| On Mon, 2004-10-11 at 23:53, Ming Deng wrote: | |>/It seems to me that continuous assignment in "wire" statement |> |> wire try1 = (state_en == 5'd8); |> |>is tended to be compiled into BUF, INV and AND gates while procedural |>assignment |> |> out<=(in==5'b00101); |> |>or "if" statement in procedure |> |> if (state_en == 5'b11111) begin |> |>are tended to be compiled into LPM_COMPARE and LPM_CONSTANT devices. But |>unfortunately most LPM_COMPARE devices have not been implemented yet. |> |>Ming Deng |> |> |> |> |>Stephen Williams wrote: |> |>> -----BEGIN PGP SIGNED MESSAGE----- |>> Hash: SHA1 |>> |>> Ming Deng wrote: |>> | I ran the sample file on Icarus Verilog 0.7, got the same result. |>> | |>> | After taking a briefly look into the code, I found there were no any |>> | comparators implemented for fpga-lpm. See the following snippet from |>> | tgt-fpga/d-lpm.c |>> |>> The -tfpga -parch=virtex supports more stuff then the default |>> LPM family. It's simply a matter of filling in the table that |>> you discovered in the d-lpm.c source file. |>> |>> - -- |>> Steve Williams "The woods are lovely, dark and deep. |>> steve at icarus.com But I have promises to keep, |>> _http://www.icarus.com_ and lines to code before I sleep, |>> _http://www.picturel.com_ And lines to code before I sleep." |>> -----BEGIN PGP SIGNATURE----- |>> Version: GnuPG v1.0.7 (GNU/Linux) |>> Comment: Using GnuPG with Mozilla - _http://enigmail.mozdev.org_ |>> |>> iD8DBQFBaqwgrPt1Sc2b3ikRAq9MAJ49FKkTlOMUtqBzLkbVwTWjavBsHQCeJyR2 |>> RuqyZMDZGAwyUe7on6KlAr8= |>> =zBrG |>> -----END PGP SIGNATURE-----/ |>
- -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBa/7grPt1Sc2b3ikRAuOXAKC2WBXCfERTJPXLGW7RGW2mj5pdZACgtEqs SDRS5CAd8P6zu5JMsO3W8Ac= =VA3O -----END PGP SIGNATURE-----
