A special, high-speed storage area within the CPU.

learn more… | top users | synonyms

9
votes
1answer
2k views

What does banking mean when applied to registers?

This answer to a question on StackOverflow about what banking means in the context of ARM's banked registers indicates that there is some confusion about the meaning of banking when applied to ...
8
votes
3answers
3k views

Do AVR registers and ports need to be initialized to zero?

During the initialization routine of my code I use to do such things as: clr r0 ; will always stay zero and: ...
8
votes
1answer
328 views

8-Bit stereo audio R-2R DAC, is this a right way to do it?

I am new to electrical engineering and the first project I would like to do is making a digital to analog audioconverter. I've found out that a good way to do this is to use an R-2R structure for the ...
6
votes
5answers
644 views

stack cache instead of registers

Is there a processor that do arithmetic operations on a stack and not on registers? To keep performance, of course, that processor should cache top block of a stack in the same type of memory that is ...
6
votes
3answers
6k views

What actually is a shadow register?

I noticed the term Shadow Register while going through a datasheet of a TMS320F28335 DSP. What does it actually mean? Does it have a physical location in the CPU as ...
6
votes
3answers
1k views

Clocked edge-triggered timing (contamination delay)

I'm reading a book about computer architecture, and it says that, in clocked edge-triggered devices, the contamination delay is usually nonzero, and that the contamination delay for registers is ...
5
votes
9answers
2k views

Microprocessors/Microcontrollers - Do registers have addresses?

My Embedded Systems professor keeps referring to the memory locations of registers as their respective "addresses". I'm confused by this; I was always under the impression that in any microprocessor, ...
5
votes
1answer
435 views

One-clock increment operation in a three-bus CPU architecture

In his chapter on CPU design, Edward Bosworth introduces the following three-bus architecture: One of the main design aims of this circuit is to be able to increment the program counter PC in a ...
4
votes
3answers
2k views

What is the main difference between registers, bit fields, and flags?

In school I was accustomed to programming various registers when working with microcontrollers to manipulate their behavior. At my job registers are now referred to purely as bit fields. The word "...
4
votes
1answer
99 views

Microcontroller memory write cycles

Information show that flash memory have a limited number of write cycles (usually ~10'000). Many MCUs emulate EEPROM in flash, hence some document this write_life_cycle. A look at any MCU datasheet ...
4
votes
2answers
535 views

Problem in writing register maps using C structure for a TI Microcontroller

I am writing register maps in C for a TI ARM based Micro-controller board. Here is the link to the datasheet. I am using the following guidelines on how Register maps should be written in C: ...
4
votes
2answers
2k views

How can a shift register be used to debounce a switch?

This is the problem: This is the proposed solution: What I don't understand: The button bounces in the setup/hold time of the input of the circuit, making the FF go into a metastable state ...
3
votes
2answers
162 views

Is it possible to exchange the content of two registers in a single clock pulse?

There are two register R1 and R2. How is it possible to exchange the content of R1 and R2 in a single clock pulse using Common bus architecture?
3
votes
3answers
601 views

What is the mechanism behind RO or WO and WR registers?

In embedded systems you have read only and write only registers. How are the two type distinguished in the netlist? I can not understand how one build a flop which you can only write and not read etc.?...
3
votes
1answer
1k views

Converting AVR assembly to machine code - addressing registers?

In AVR Assembly - I want to work out the machine code representation of the following: ANDI r18,$10 I know the opcode for ANDI is ...
3
votes
2answers
4k views

How do I select what values to load in CCPR1L register (for generating PWM signal with PIC)?

I need to generate PWM signal with PIC18F2550 microcontroller at near 20kHz. I read the datasheet, I found it too complex and confusing, then I started to search for a sample code on the net to ...
3
votes
2answers
322 views

Confusion between register size, address size, data size

I started learning about pointers in C++ and I figured I should educate myself a bit on how memory works and is accessed. I read that when we say a processor is 64-bit, it has a 64-bit register and ...
3
votes
3answers
1k views

Can I pass a bit register as a function argument in Hi-Tech C compiler for PIC16?

Is there a way to pass a bit from a PIC's register as a function parameter? Taking, for example, the PIC16F887, its registers (SFRs) and individual bits are defined as fallows in the corresponding ...
3
votes
1answer
70 views

Register behaving like latch in verilog

I have the following block of code - ...
3
votes
1answer
189 views

VHDL code and unintended latches

I am working on coding a Regsiter a1 with input signals b1,rst and wra1 the register ...
2
votes
2answers
2k views

Setup Time, Hold Time - What is the underlying principle for having them?

I'm learning about setup time and hold time of a FF connected to a bus. But the textbook fails to explain exactly why are those needed in an operation. Isn't a FF always powered on and attentive to ...
2
votes
1answer
492 views

MSP430 RAM protection

I'm looking at the user guide for the MSP430x5xx family. It says there in section 9.1 that: ...
2
votes
5answers
243 views

How does register type modifier work on different CPU architectures?

This question is to clarify my doubt against this register storage class. when a variable is register qualified ,compiler puts the variable in a cpu register other than RAM for ease of access. so ...
2
votes
2answers
896 views

What is the meaning of “Register.Rd”?

Reading Hennesy's book "Computer Organization and Design" it is mentioned "Register.Rd" and "Register.Rs" but what does it mean? The .Rd, .Rt and .Rs parts I can't understand, on page 365:
2
votes
2answers
737 views

Verilog asynchronous reads of regs - and design question

I'm trying to understand what the following bit of behavioral code, what kind of hardware it turns into: ...
2
votes
3answers
901 views

Understanding Flip Flops/Registers in Low Level

So I'm reading "Elements of Computing Systems" trying to really understand how everything works underneath (Any other book/article suggestions that would help would be amazing) Since eventually I want ...
2
votes
2answers
731 views

early accumulator based machines

Wikipedia says that many of the early machines were accumulator-based machines. My guess is that in those machines the accumulator did not play the role of a speed-up register as do registers in today ...
2
votes
1answer
328 views

Eliminating Signal Race Hazard in an IC dynamic latch/register!

I work in MAGIC Integrated Circuit software at layout-level. I got an 8bit dynamic register made of 1bit dynamic flipflops that write input on the positive edge of the signal: (Note: I used ...
2
votes
2answers
7k views

What is the difference between TCCR1A and TCCR1B [closed]

I had an error in the configuration of PWM for the atmega8 because I didn't set my register properly. But I thought that Timer 1 is timer 1, no matter is TCCR1A or TCCR1B. Why can I set all the timer ...
2
votes
4answers
867 views

What is important in computer clocks' signal: signal edges or intervals when signal is stable? Will multiple value propagation occur?

I am trying to figure out some basics of digital electronics. We have all seen the squared graph of the computer clock signal: I have read multiple articles on the Internet and still can't figure ...
2
votes
2answers
1k views

How many servos can I run on an ATtiny85?

This is my first time asking a question on this website, so please correct me if I'm doing something wrong... I have been working on a small project which runs three Servo motors on an ATtiny85, ...
2
votes
3answers
113 views

Write to sets of two bits in a register at a time in C

I am trying to set multiple values into a 32 bit register, and each value has 2 bits. Trying to come up with an elegant way to do this. Write now I have something like this: ...
2
votes
2answers
152 views

Register Syntax question

I was reading some code to use an on an arduino ATMEGA328P and I can't figure out what this line of code does. ASSR &= ~(_BV(EXCLK) | _BV(AS2)); I know that ...
2
votes
2answers
283 views

What does register and bus size depend on?

So here is a hardware sequential multiplier depicted. Number A is 51 bits width, number B is 48 bits width. I have to choose the most efficient size of buses and registers (optimize according to ...
2
votes
1answer
1k views

Access Register/signal from Multiple Modules (Shared Memory)

I want to implement a data register to store up to 256 8 bit chunks (VHDL). I also need to to be able to access and modify these values from multiple vhdl modules. One module will access the register ...
1
vote
1answer
247 views

Clearing Flag Bits By Writing 1

Most of the interface devices have various flag bits (that can also raise interrupts if that functionality is provided) used to check the status of the device/operation. Usually they are cleared by ...
1
vote
1answer
120 views

AVR registers location

There are four types of registers in AVR. \$r_0\$ - \$r_{15}\$ witch used for CPU's calculations. \$r_{16}\$ - \$r_{31}\$ witch used for user's temporary data storage. Registers for I/O statements. ...
1
vote
1answer
74 views

FPGA design rules - Using a Module Output Register Value Internaly

I'm trying to optimize a verilog code and I found something that I don't feel it's correct. I found a module that has an output and it's using that output value as a condition in a case statement. ...
1
vote
2answers
1k views

How to design a left shift register

I want a circuit in which I get the following sequence: 0001, 0010, 0100, 1000, 0001 I know that it's 4-bit shift register. But what is my approach to design ...
1
vote
2answers
1k views

VHDL: How to double read a register bank?

We have been tasked with creating a register bank that can dual read, but only single write. At the moment I've got it all working apart from the dual read. Could someone point me in the right ...
1
vote
2answers
560 views

help me to understand ANSEL register in PIC

in new to PIC,this is bit confusing. For switch ,usart we should clear ANSEL regsiter to make as digital IO so then only we can read 0 or 1 from that pin?, data sheet says if we set particular pin ...
1
vote
1answer
44 views

What do the TXRB bits do in the CiTXnDLC registers of a dsPIC 30F?

The family reference sheet for the dsPIC 30F line, page 23-7, describes register 23-5 CiTXnDLC. (Page 627 of the PDF linked here.) Bits 8 and 7 are labeled TXRB<1:0>: Reserved Bits, with the note "...
1
vote
1answer
129 views

Signed to unsigned for registers

I have just started to program some code at the lower levels. I have been told to change any signed integers into unsigned integers and store these in the HW registers. I have done this OK but I am ...
1
vote
2answers
232 views

register without clk

I'm designing a small system in VHDL using the datapath and contorller method. Is it okay if I design registers that don't have a clock input (load data on the rising edge of the load signal) as they ...
1
vote
1answer
2k views

Difference between a n bit Latch and a buffer

What is the difference between a 8 bit buffer and a 8 bit latch? Are they both used for the same purpose? The 74LS273, is a buffer or a latch?
1
vote
1answer
139 views

Data transfer between FFs in a CPU

I was in computer organization lecture and when we wrote what the CPU does during an add instruction (like micro instructions) something got me thinking. I didn't understand how we let one of the FFs ...
1
vote
3answers
550 views

what happens when the carry bit is zero in addition/subtraction algo for hardware

This is the algorithm in flow diagram for addition and subtraction in computers. A(s) is the sign bit of A B(s) is the sign bit of B //(s) denotes the subscript E is the register that has a carry ...
1
vote
1answer
43 views

Make a Interrupt on a stm32f4xx

I'm new to Cortex M4 and programming on a microcontroller. I'm still learning the basics. I'm using this board (stm32f411re), here is the reference manual. I am trying to make an interrupt on the ...
1
vote
1answer
75 views

Is my understanding of D-Flip Flop wrong?

So I am working on: http://www.nand2tetris.org/ and I am having a hard time understanding the D-Flip Flop, or maybe I should say, how Logism represents it. I have this circuit and this is the current ...
1
vote
1answer
458 views

MIPS assembly instruction to machine code in hex

I am doing some practice problems involving MIPS assembly instructions and machine code(in hex). I am doing a problem but am uncertain if it is correct. This is the problem, and what I did: ...