Guest
Given a number between 0 and 255(8 bit input), I'd like my ROM module to respond with one of 16 different modes (4 bit output). Some modes will repeat multiple times.
So the ROM lookup would be something like :
0 -> MODE_0
1 -> MODE_1
2 -> MODE_6
3 -> MODE_9
4 -> MODE_6
5 -> MODE_12
..
..
128 -> MODE_15
Sounds like a 256x4 ROM would be the best way to go at this. It would be really nice to create a subtype for the outputs so I can just reference them directly as "MODE_9" and not "1001".
Any insight or guidance would be appreciated!
-V
So the ROM lookup would be something like :
0 -> MODE_0
1 -> MODE_1
2 -> MODE_6
3 -> MODE_9
4 -> MODE_6
5 -> MODE_12
..
..
128 -> MODE_15
Sounds like a 256x4 ROM would be the best way to go at this. It would be really nice to create a subtype for the outputs so I can just reference them directly as "MODE_9" and not "1001".
Any insight or guidance would be appreciated!
-V