0
\$\begingroup\$

I am very new to electrical engineering.

But I am working on a hyper reduced fully functional RISC architecture. This is mostly finished, I have a compiler for it and the emulator is not fully complete yet but it seems to be fully functional, it is limited to 16 instructions with 1 of them reserved for extended instructions such as interrupt calls.

When working on silicon design (Not really on the silicon phase yet but circuit design) I noticed that the XOR gate seems overly complex.

Why would this not work:

schematic

simulate this circuit – Schematic created using CircuitLab

I was was led to believe that the resistors were required for high frequencies to drain the circuit before next clock pulse.

I am new to this so if this is horribly wrong please correct me.

\$\endgroup\$
10
  • 1
    \$\begingroup\$ @Xeno Are you trying to build an RTL (resistor-transistor logic) or DTL (diode-transistor logic) computer? When you write, "hyper reduced fully functional RISC archatecture", I see fully functional and see a lot of work ahead of you. Especially if this is the level where you are starting. Not meant as a criticism. I say "go for it." But it is an observation and I think you may need to steel yourself for the work ahead. \$\endgroup\$ Commented Feb 16 at 5:03
  • 1
    \$\begingroup\$ As it stands, this is horribly wrong. Perhaps you should write down some basic requirements, such as what the input and output signal levels are. It currently looks like the inputs are voltage (or current?) sources, while the output is current sink? How is that supposed to work? \$\endgroup\$
    – Dave Tweed
    Commented Feb 16 at 5:20
  • \$\begingroup\$ You might look here for some standard CMOS implementations, and here for some discussion on some key points about what makes a family of logic gates suitable for building larger circuits. \$\endgroup\$
    – Dave Tweed
    Commented Feb 16 at 5:28
  • \$\begingroup\$ When working on silicone design Sorry, you're not working on silicon design. Silicon design is designing chips. You're working on circuit design. I suggest you head over to homebrew logic and CPU pages on Hackaday. I highly suggest starting with Yann Guidon's (YASEP's) page: hackaday.io/whygee \$\endgroup\$ Commented Feb 16 at 5:34
  • \$\begingroup\$ @periblepsis I have already worked out the archatecture and have developed an assembler for it and wrote the compiler, it has 16 instructions with full functionality. About the resistors i was led to belive they were necisary to operate correctly... \$\endgroup\$
    – Xeno
    Commented Feb 16 at 6:18

3 Answers 3

0
\$\begingroup\$

Why would this not work:

assuming series resistor should be a pull down this circuit will do XOR it will however do it better with the PNP transistor the other way round.

Also The output amplitude will be less than the input amplitude so some buffering is needed.

Other circuit designs use more parts to make them faster, stronger, or more energy-efficient.

\$\endgroup\$
1
  • \$\begingroup\$ you are right im so sorry i did put the pnp backwards... \$\endgroup\$
    – Xeno
    Commented Feb 16 at 6:15
1
\$\begingroup\$

There are a number of problems with this implementation.

What silicon process is this going on to? Implementing bipolar transistors resistors and diodes on a CMOS process is not area efficient you will probably find that this takes more silicon area than a conventional xor made from FETs. Below is a 10 transistor 'conventional' xor, note and1 and nor1 are a combined 6 transistor and-nor gate, your and gate alone is 6 transistors.

schematic

simulate this circuit – Schematic created using CircuitLab

Although the design may do xor it has no gain. When you design a cell for a large design it is necessary to be able to characterize it for propagation delay and drive capability. This allows you to ensure that your design will meet its timing requirements with a reasonable amount of effort. The timing of your cell will be overly sensitive to the drive capability of the preceding cell and the type of load put on the output.

The cost per FET today is very low the big problem is power dissipation. This circuit will use far more power than a CMOS implementation.

\$\endgroup\$
3
  • \$\begingroup\$ i am trying to find an efficent XOR for a micro-proccessor and i dont understand how it is larger than the current XOR implimintation. The reason i post it is because is seems to be smaller, perhaps i have not found a decent one but when i broke it down and optimized (as far i I can understand) to raw silicon it aperes smaller usingm. \$\endgroup\$
    – Xeno
    Commented Feb 16 at 6:15
  • 1
    \$\begingroup\$ On which silicon process? \$\endgroup\$
    – RoyC
    Commented Feb 16 at 7:02
  • \$\begingroup\$ Czochralski process, at least that is my goal. \$\endgroup\$
    – Xeno
    Commented Feb 16 at 16:26
-1
\$\begingroup\$

I noticed that the XOR gate seems overly complex

At the most basic level, every gate implements a truth table. So, at a minimum, you could just have a programmable truth table, and you can get any gate you want. All you need then is a multiplexer:

schematic

simulate this circuit – Schematic created using CircuitLab

As shown, the gate is configured to be an AND gate. The inputs 0-3 to the multiplexer are related to output values in the rows of a truth table. So, take the output column from a truth table, stick it into the circuit above, and you have a gate or any other logic function according to that truth table.

It is not particularly complicated to have a simple diode-transistor implementation of such a mux.

The 4-input multiplexer connects output to one of the inputs that are attached to either supply rail, so it always regenerates the signal.

With two inverters added, you can use a 2:1 mux instead:

schematic

simulate this circuit

With a 4:1 mux, we had 4 inputs, and 2 choices of signals to feed to each input - VCC or GND (logic high or low). 2^4=16 possible gates.

With a 2:1 mux, we have 2 inputs, and 4 choices of signals to feed to each input: VCC, GND, IN1, not(IN1). 4^2=16 possible gates.

As shown, the configuration for both mux-gates is that of an AND gate.

Inverters are easy, and a 2:1 mux is not particularly hard either :)


If I were you, I'd use off-the-shelf CD4000-series gates that you can buy from major vendors (DigiKey, Mouser, etc.), and also directly from TI (Texas Instruments), in either DIP or surface-mount packages. Every common chip in that family that has 14 or 16 pins is still available in DIP, brand new!

Below is the collection of the basic gates from the 4000 series, drawn myself. CD4049, CD4050, CD40109, CD4504 are level translators and you wouldn't need them. The processor made of these can be tuned for clock rate vs. supply voltage, just like desktop CPUs, and for the same reason. The higher the voltage, the faster it can go. CD4000-family can be slow and sip power at 3V, or rather zippy at 15V. With the chips of recent manufacture (last 15 years or so), peak speed is between 12V and 15V, with minimum gains from 12V up.

enter image description here enter image description here enter image description here

Not shown is the 8-input CD4048 configurable expandable gate that can be configured to be the gate of your choice :)

The reference for the entire CD4000 family that TI still makes, and a few interesting but obsolete parts in that family, in high-rez PDF and in Goodnotes format, are here:

CD4000 Logic Reference Cards.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.