discuss-gnu-electric
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch: reverse order of signals in a bus


From: Tuukka Toivonen
Subject: patch: reverse order of signals in a bus
Date: Thu, 19 Jul 2001 14:32:00 +0300 (EEST)

problem: if I have a bus in my schematics, eg x[0:1], the simulator puts
them in the waveform window in this order: x[0], x[1]. When I combine them
into a bus, the bus thinks that MSB is first, so if i set the bus value to
1, I get x[0]=0, x[1]=1 which is wrong.
I can reverse the order of the signals manually but this is a tedious task
for bigger busses (i'm using 24-bit busses).

solution: several possible solutions are possible, i think the signals
should be in the right order in the first place. Maybe a bus should take
the signals as LSB first? (i made this patch once but then scrapped
it... but if its considered a good solution, i can redo it)

I have here one possible solution which adds new command 'M' to simulation
window that reverses the order of selected signals. It needs still work
before it could be included in to the electric; it should work also if
only a single bus is selected; however right now it is here so that
hopefully people will comment it. Especially I'd like to know what Steven
thinks about it; is it a right way or should I take some completely other
approach?

The full source is on my electric page (if there's somebody who doesn't
use patches =)

Attachment: electric-6.04ad.reverse.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]