CMOS transmission gates (by )

As I mentioned before, I plan to implement CMOS transmission gates in my digital logic simulator.

However, while driving back from dropping Jean off at the nursery this morning, it struck me that they wouldn't be as trivial as I'd naively thought, for an obvious reason; if a change occurs on one data line, then the gate will cause a corresponding change to its driver on the other data line, after a small gate delay. However, the gate will also be bound as an output on that line, meaning that it will then be told of its own change when the scheduler performs it, so it'll end up making the same change on the output driver of the original input line, meaning it locks the line in that state; when any other drivers try to assert another logical state, there'll be a driver conflict.

Duh.

I see four possible solutions.

A third type of device < -> line connection

Right now, devices have a number of input pins and a number of output pins, each of which can be individually bound to a single line. Anything bidirectional has to be handled as a pair of pins, one input and one output, connected to the same line. For example, my SRAM device has data inputs and separate data outputs; and they can be joined to the same bus for a bidirectional interface, or wired independently. But perhaps I could introduce a third class of pin, bidirectional pins, which are handled specially; bidirectional pins would not be notified of changes to the line they cause. That way, a transmission gate could have two bidirectional pins, and whenever it receives a change on one, it copies the change to the other bidirectional pin. It'd keep track of which side was being driven and make sure the driver on that side was in the HI-Z state so as not to cause a collision.

Line bridging support

Perhaps I should make it possible to 'bridge' two lines. Pick one arbitrarily as the master, and the other as the slave, and inform them both of this fact. Then when the simulation loop has applied changes to one or more drivers of either line, the master is told to compute the line's new state; it asks the slave to compute the state of its drivers, then merges this with the state of its own drivers to deduce a shared state, which it then tells the slave to inform its connected devices of, before informing its own. The transmission gate would then work by, when the control input was asserted, bridging its two lines together, and unbridging them when the control input drops.

Not bothering

Perhaps I can get by without transmission gates. They're quite low level things, mainly useful in designing flip-flops and multiplexers, so I can probably just define higher-level devices that use them and be done with it. However, I did see high-level use for them in routing signals on bidirectional busses, which would otherwise have to be done with pairs of tristate buffers that listen to the read/write control signals on the bus and configure themselves appropriately, requiring extra logic, and being slower when implemented in silicon.

Using weak logic

As I sit writing this, I realise there's probably a simpler solution; I'll need to think longer to see if there are any showstopping gotchas. That's to use my weak logic system I designed, avoiding the need for any infrastructure changes at all. Under this system, the transmission gate would have (apart from the control input) two input pins and two output pins, designed such that each bidirectional interface is made by joining an input pin and an output pin to the same line. Any line state change notification from either input pin would be ignored if it matched the last state notified, to prevent changes bouncing back and forth between the two lines, but if not then the input line state would be weakly driven onto the opposite output pin. That way, if side A was in the 1 state, the transmission gate would output a weak 1 to side B; and if nothing else was driving side B (as should be the case in a bus), B would then end up in state 1. When the notification of B's resulting state change came back to the B input, it would be seen to be the same as the last state change sent through the gate, and ignored.

Likewise with state 0, and likewise if the sides are reversed.

It gets interesting if something on A drives a 1 and something on B drives a 0 (or vice versa), in which case, the transmission gate will be weakly driving a 1 onto B and a 0 onto A, which will have no effect and not raise an error, even though in a real circuit this would be shorting Vdd and Vss. So the transmission gate itself will need to notice that state and make an error message, I think.

Hmmm, that may be the correct solution... The only downside is that one cannot use weak logic for anything else on those lines, but I suspect one shouldn't be using weak logic around transmission gates anyway, due to the extra line resistance they cause.

Although I still think I'll introduce a weak notion of a bidirectional pin, even if just for neatness; as syntactic sugar, binding a bidirectional pin number N to a line will just bind input pin N and output pin N to the same line (input and output pins have separate numbering schemes).

Blog Sections (by )

For those of you who read this blog to see how the family's doing, my computing / electronics posts are probably a bit irrelevant. And for tecchies, all the personal family stuff probably gets in the way of the bits you find interesting.

So I just thought I'd make sure everybody realised that the 'Categories' section on the right has links to separate sections of the site for Alaric (and my subtopics), Jean, Sarah, and The Family (which is about things that affect us as a whole, such as our domestic arrangements). Clicking on a section link takes you to what's basically a sub-blog only showing things in that section, with its own RSS feed and everything.

Enjoy!

Digital logic progress (by )

Yay! The core of the logic simulator is getting pretty near completion now. I've been working on a project that involves glacial compilation times, which give me 5-10 minute blocks every 30 minutes or so, so I've been typing in the list of logic simulator changes I had written in my notepad. Read more »

More B&B’s (by )

Crossways Guest House 57 Bath Rd, Cheltenham, GL53 7LH Tel: 01242 527683

Cock Inn The Nibley Hill, Blakeney, GL15 4DB Tel: 01594 510239

Corner Cottage Corner Cottage Stow Rd, Alderton, Tewkesbury, GL20 8NH Tel: 01242 620630

Jolifleur London Rd, Poulton, Cirencester, GL7 5JG Tel: 01285 850118

Cardynham House The Cross, Painswick, Stroud, GL6 6XX Tel: 01452 814006

Upper Doreys Mill Upper Doreys Mill, Edge, Stroud, GL6 6NF Tel: 01452 812459

Crickley Court Crickley Court/Crickley Hill, Witcombe, Gloucester, GL3 4UF Tel: 01452 863634

Brookthorpe Lodge Brookthorpe Lodge/Stroud Rd, Brookthorpe, Gloucester, GL4 0UQ Tel: 01452 812645

Notley House & Coach House 93 Hucclecote Rd, Gloucester, GL3 3TR Tel: 01452 611584

Pembury The 9 Pembury Rd, Gloucester, GL4 6UE Tel: 01452 521856

Hillenvale Guest House The Plain, Whiteshill, Stroud, GL6 6AB Tel: 01453 753441

Lulworth Guest House 12 Midland Rd, Gloucester, GL1 4UF Tel: 01452 521881

London Hotel The 30-31 London Rd, Stroud, GL5 2AJ Tel: 01453 759992

Dorchester 63-65 Denmark Rd, Gloucester, GL1 3JJ Tel: 01452 502269

Gemini 83a Innsworth La, Gloucester, GL2 0TT Tel: 01452 415849

Edendale Guest House 92 Westward Rd, Stroud, GL5 4JA Tel: 01453 751490

Hillview 104 Kingscourt La, Stroud, GL5 3PX Tel: 01453 758234

Longford Lodge 68 Tewkesbury Rd, Longford, Gloucester, GL2 9EH Tel: 01452 526380

Longford Mews 80 Tewkesbury Rd, Longford, Gloucester, GL2 9EJ Tel: 01452 527942

Hope Orchard Gloucester Rd, Staverton, Cheltenham, GL51 0TF Tel: 01452 855556

Caravan Sites (by )

Red Lion Inn Camping & Caravan Park Caravan-Red Lion Inn/Wainlode Hill, Norton, Gloucester, GL2 9LW Tel: 01452 730251

Willow Hill Caravan Park Willow Hill, Apperley, Gloucester, GL19 4DJ Tel: 01452 780236

Tewkesbury Abbey Caravan Club Site Gander La, Tewkesbury, GL20 5PG Tel: 01684 294035

Briarfields Caravan & Camping Gloucester Rd, Cheltenham, GL51 0SX Tel: 01242 235324

Cirencester Park Caravan Club Site Cirencester Park, Cirencester, GL7 1UT Tel: 01285 651546

Tudor Caravan Park Shepherds Patch, Slimbridge, Gloucester, GL2 7BP Tel: 01453 890483

Camping & Caravanning Club Brooklands Farm, Alderton, Tewkesbury, GL20 8NX Tel: 01242 620259

Davis K Kings Green Farm/Kings Green, Berrow, Malvern, WR13 6AQ Tel: 01531 650272

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales