|
From: Maciej S. <mac...@ce...> - 2015-03-07 20:00:01
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Excuse the lack of clarity. Steve got it right, I had problems with regular (non-indexed) part selects, for example: local_data[ipn+8:ipn]. I have not used indexed part select before, therefore I am grateful to Larry for his excellent suggestion. It is alread applied in the pull request [1]. Regards, Orson 1. https://github.com/orsonmmz/iverilog/commit/d1dc98b7f73c21e4eae4bde91855ef5f41059dde On 03/06/2015 11:14 PM, Stephen Williams wrote: > > INDEXED part select can be non-constant. The width part of index > part select must be strictly constant. > > Regular part select indices must be strictly constant. I think if > we don't use the work "indexed" then the part select is the regular > kind. Is that really what you mean, Orson? > > > On 03/06/2015 12:32 PM, Larry Doolittle wrote: >> Orson - > >> On Fri, Mar 06, 2015 at 08:57:35PM +0100, Maciej Sumiński wrote: >>> I had to correct the previous implementation for accessing >>> constant arrays of vectors. I did not realize that ranges in >>> part selection have to be constant, and variables are simply >>> forbidden even if the difference between indices is constant. >>> This makes the solution useless if one wants to implement e.g. >>> a multiplexer. > >> Maybe I don't fully understand the terminology, but I build >> multiplexers "all the time" using indexed part select, e.g., > >> module foo( input clk, input [3:0] ipn, output reg [7:0] ip1 ); >> reg [127:0] local_data; // stuff to set local_data not shown >> always @(posedge clk) ip1 <= local_data[{ipn,3'b0}+:8]; >> endmodule > >> - Larry > >> ------------------------------------------------------------------------------ > >> > > Dive into the World of Parallel Programming The Go Parallel > Website, sponsored >> by Intel and developed in partnership with Slashdot Media, is >> your hub for all things parallel software development, from >> weekly thought leadership blogs to news, videos, case studies, >> tutorials and more. Take a look and join the conversation now. >> http://goparallel.sourceforge.net/ >> _______________________________________________ Iverilog-devel >> mailing list Ive...@li... >> https://lists.sourceforge.net/lists/listinfo/iverilog-devel > > > > > ------------------------------------------------------------------------------ > > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly > thought leadership blogs to news, videos, case studies, tutorials > and more. Take a look and join the conversation now. > http://goparallel.sourceforge.net/ > _______________________________________________ Iverilog-devel > mailing list Ive...@li... > https://lists.sourceforge.net/lists/listinfo/iverilog-devel > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU+1i7AAoJEBRwGu1hpbJ14fEIAJFozRfOy/yObGsF41xHl9am p5nOa1QbYDZCBGCWtracH8fl5xb7L+RrIw5Kcwo57tqBwx/2gFLv7BVvdl9QP1nW HgvAENCYfvrGlVzTTkree0E2qAKQHI4y9cs/anv+E2qY3oHBDsM3hcfaBF4lyI7L DE4O8ZnpuXHKg8fRiFZwzpCDoEF5q5/yvIy5ZzoEaQlQfOIenCNoMNc6GfHl8G9b ZXnGae1BnZ0LULIGrRVY3edSEh9JUHk5U5kgcs3Dl6jW5udjjTKGeF7jzaPzov1I 61Vb/gix5L9uy62xPkzXzZE5yhe7sWbr2D+QxyP0E0qXdHcBplhv9NPHdHcVlJE= =cPlt -----END PGP SIGNATURE----- |