# Micro and Nano Memory, Calculate Reducing Bits?

I ran into a question:

in digital system with micro-programmed control circuit, total of 32 distinct pattern operation signal is 450. if the micro-programmed memory contains 1K micro instruction, by using Nano memory, how many bits is reduced?

1) 22 Kbits

2) 23 Kbits

3) 450 Kbits

4) 450*32 Kbits


I read in my notes, that (1) is true, but i couldn't understand how we get this?

Micro instructions are stored in the micro memory (control memory). There is a chance that a group of micro instructions may occur several times in a micro program. As a result the more memory space isneeded.By making use of the nano memory we can have significant saving in the memory when a group of micro operations occur several times in a micro program. Please see for nano technique ref:

Edit:

Micro-memory The micro memory only concerns how we organize whats in the control memory. However when we have big instruction sets, we can do better than simply storing all the instructions. We can subdivide the control memory into "control memory" and "nano memory" (since nano is smaller than micro right ;) ) This is good as we don't waste a lot of valuable space (chip area) on microcode.

The concept of nano memory is derived from a combination of vertical and horizontal instructions, but also provides trade-offs between them.

The motorola M68k microcomputer is one the earlier and popular µComputers with this nano memory control design. Here it was shown that a significant saving of memory could be achieved when a group of micro instructions occur often in a microprogram.

Here it was shown that by structuring the memory properly, that a few bits could be used to address the instructions, without a significant cost to speed. The reduction was so that only the upper log_2(n) bits are required to specify the nano-address, when compared to the micro-address.

• Does "nano memory" mean "cache"? Apr 15, 2015 at 14:34
• @brhans okey now seems fine Apr 15, 2015 at 14:38
• Translation issue here? There's quite a lot more "micro" than I'd expect and I have no idea what is meant by "nano memory". Apr 15, 2015 at 15:01
• @pjc50 PELASE SEE www2.informatik.hu-berlin.de/rok/ca/data/slides/english/ca9.pdf Apr 15, 2015 at 15:31

Ultimately I think the question is flawed. And I do NOT get close to any answer. Hard to get 22k saved from 32K, when nanocode takes up 14.4K.

From 1.

In some cases, such as the Motorola 68000, there is also a nanocode engine. The 68000 uses 544 17-bit words in its microengine and 336 68-bit words in its nanocode engine. It thus has 32,096 bits of ROM. If everything had been some with 68-bit words, it would have required 36,992 bits.

Memory was expensive with Complex Instruction Set Computers, so microcode executed multiple instructions [Inc Memory] (Read Memory, Inc Register, Store Memory). To decrease microcode, Motorola implemented nanocode, which microcode called.

544 words × 17-bit microcode words + 336 word × 68-bit nanocode words = 32,096 bits of ROM.

544 words × 68-bit microcode words = 36,992 bits of ROM.

36,992 - 32,096 = 4,896 bits saved.

$$log_2 336 = 6.63$$

To represent the 336 nanocode words, 7 bits are required. Actually have 17. This makes sense, since similar microcode or nanocode can use don't care states to select different operations.

From 2 slide 11 notes.

There are n= 2048 words that are each 41 bits wide, giving an area complexity of 2048 × 41 = 83,968 bits.

The unique microwords (100 for this case) form a nanoprogram, which is stored in a ROM that is only 100 words deep by 41 bits wide

$$log_2 100 = 6.64$$

7 bits minimum are needed in microcode to access nanocode.

The microprogram now indexes into the nanostore. The microprogram has the same number of microwords regardless of whether or not a nanostore is used, but when a nanostore is used, pointers into the nanostore are stored in the microstore rather than the wider 41-bit words. For this case, the microstore is now 2048 words deep by bits wide. The area complexity using a nanostore is then 100 × 41 + 2048 × 7 = 18,436 bits, which is a considerable savings in area over the original microcoded approach.

18,436 bits vs. 83,968 bits. Significant savings.

Same methodology. Microcode indexes into nanocode. Microcode is saved, but nanocode ROM must be added to determine true savings. True savings = 9,152 bits.

9.1k is significantly less than 22k. But 450 words × 32-bit = 14,400. Hard to get 22k saved from 32K, when nanocode takes up 14.4K. No answer is correct. Hence my assertion that the question is flawed in some way.

As per Maryam Ghizhi comments below:

1024 × 32-bit - 1024 × 9-bit = 23,552 bits or 23kbits (saved).

Savings are microcode. So 32 bits - 9 bits = 23 bits × 1024 words = 23kbits.

This is one of the answers on the list. It is saved from microcode (ignoring nanocode). Final Answer: 2.

Within the parameters of the question, since 9 bits are required to address 450 nanocode locations, there is no way to get to 22Kbits of microcode saved.

Edit...

From 3, where it appears you have asked this equation before (along with a bounty):

in digital system with micro-programmed control circuit, total of distinct operation pattern of 32 signal is 450. if the micro-programmed memory contains 1K micro instruction, by using Nano memory, how many bits is reduced from micro-programmed memory?

The from micro-programmed memory is a very important component of question, which makes the correct answer "2".

I'd focus on why the correct answer is not 2. Not why your notes says the correct answer is 1. Like I said, flawed question.

• Maybe my ref is wrong, but the last answer that I mentioned is okey and correct. Apr 16, 2015 at 13:03
• I've read your reference in comments, but it does not get into details of calculation. I've just added a second reference. No expert, but methodology follows references. Nice, poorly worded question. Hard to get 22k saved from 32K, when nanocode takes up 14.4K. 8) Apr 16, 2015 at 13:15
• (1024*32)-(1024*9)=23K saved but answer say 22K. Apr 20, 2015 at 18:41
• with nano memory - micro memory = saved memory. Apr 20, 2015 at 18:42
• So is it possible to reach 22K ? Apr 20, 2015 at 19:09