Tag Info

New answers tagged

1

You have a couple of options. You can add the extra hardware in the data path to allow it to occur in one cycle. This has difficulties in a pipelining architecture because a dual port register file is often used for simultaneous reads and writes for the different stages. This adds the need for a second write port. Without this, there really is not a way ...


3

One thing you'll need to consider is whether to allow any form of multi-word instruction, or anything that can "act" like a multi-word instruction; if you do, you may then want to consider whether to use additional instruction words following the main instruction, or prefix words before it. Allowing prefixes and follow-on words can increase the complexity ...


4

The ISA I wrote for class once had a 4 bit op code like so: 1XXX ALU instructions 01XX jump, jump register, call etc 001X branch not equal, branch equal zero 000X 0 - load, 1 - store Rather than being the most optimal, this is one of easier styles to construct/design gates for because the input signal of a single bit can control entirely what logic path ...


9

I think it is a good approach to study some other instruction sets. A small one would be the MSP430 from TI it is a 16bit Processor with about 22 instructions. http://www.physics.mcmaster.ca/phys3b06/MSP430/MSP430_Instruction_Set_Summary.pdf You could also look into the Atmel AVRs they have also a quite small instruction set. In a little project of mine ...


7

Study (but don't replicate) the ARM approach to instruction coding. It's heavily prefix-orientated (like the Huffman tree approach recommended by Dzarda) and highly uniform in terms of where the register select part of the instruction is. The unimaginative but reliable approach is to enumerate all the control signals you have, which will probably be more ...


4

Once I tried doing a 4-bit CPU with 8-bit instruction length core in Logisim. Ended up with a simple state machine, more than a CPU, really. Random things to look for Huffman trees Fixed-length or variable encoding? Is it a von Neumann design with single address space, or Harvard-style with separate data/program? Excellent video on Computerphile about ...


0

I can recommend you to have a look to the PowerAPI tookit, a middleware library that estimates the power consumption of the CPU in real-time. You can even have an estimation of the power consumption per process. PowerAPI does not require any third-party power meter to be connected (unless you need a custom power model).


0

If you're mapping a given executable and you have access to more information about the CPU then you may be able to use some equations from frequency scaling to get a power profile. For instance, the power consumption of a processor is estimated by: $$ P = C * V^2 * F $$ where P is power, C is the capacitance being switched per clock cycle, V is voltage, ...


0

You want a leaded, possibly hand solderable cpu in a world of bga/lga cpus... Ball/Land Grid Array are leadless package types, which are soldered, using wave/reflow soldering. Modern x86 processors require hundred of connections, which leaded packages are not good at.


2

That's basically because designing a full SoC, from scratch, would require tons of money. And of time of course, that is basically the same thing. The list you provide seems quite right to me, you might want to throw in some other interfaces such USB or PCI, and maybe add some peripherals such as a GPIO expansion port, like the raspberry pi. After that you ...


7

An alternative view : Microcontrollers don't run out of memory. At least, not when programmed properly. Programming a microcontroller is not exactly like general purpose programming, to do it properly you have to be aware of its constraints and program accordingly. There are tools to help ensure this. Search them out and learn them - at least how to read ...


3

I really like Majenko's answer and +1'd it myself. But I want to clarify this to a sharp point: Anything can happen when a microcontroller runs out of memory. You really cannot rely on anything when it happens. When the machine runs out of stack memory, the stack most probably becomes corrupted. And as that happens, anything can happen. Variable values, ...


0

AVR has reset vector at address zero. When you overwrite the stack with random garbage you'll eventually loop around and overwrite some return address and it'll point to "nowhere"; then when you return from a subroutine to that nowhere, the execution will loop around to address 0 where a jump to reset handler usually is.


7

In general the stack and the heap crash in to each other. At that point it all gets messy. Depending on the MCU one of several things may (or will) happen. Variables get corrupted The stack gets corrupted The program gets corrupted When 1 happens you start getting strange behaviour - things not doing what they should. When 2 happens all manner of hell ...



Top 50 recent answers are included