Forum Discussion
Altera_Forum
Honored Contributor
17 years agoHow can I neaten this up?
I have writte some code that works, but its long and looks primitive. Any tips how to rewrite this short and more elegant without change the function of it? I am reading serial bits from a Copernicus...
Altera_Forum
Honored Contributor
17 years agoDo this.
bitstreamin[300:269] <= bitstreamin[299:268]; - or you can also include GPSIN directly in one assignment like: bitstreamin[300:268] <= {bitstreamin[299:268], GPSIN}; Similarly, twire[7:0] <= gpsasci[229:221]; Note: If twire is declared with only bits 0-7, and not any more bits, like reg [7:0] twire; you can also do twire <= gpsasci[229:221];