Questions tagged [register]

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

Filter by
Sorted by
Tagged with
19
votes
4answers
4k views

What stops an assembly program from crashing the operating system? [closed]

First of all, I am a beginner, so if this question sounds silly, please point out the incorrect assumptions. From what I understand, the job of an operating system is to manage hardware and the ...
16
votes
1answer
7k 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 ...
16
votes
3answers
18k 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 ...
10
votes
4answers
4k views

Where are registers and what do they look like?

I racked my brain through my comp-arch class and reread wiki’s article on hardware registers (they’re flip-flops, I get that), but one year later and I still don’t understand what a register ...
9
votes
3answers
7k 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
2k 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 ...
7
votes
9answers
6k 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, ...
7
votes
5answers
41k views

What is the difference between registers, flip flops and latches?

I want the answer to the very basic level. I know what they mean individually, but what I am looking for is connection between them.
6
votes
8answers
3k views

What prevents the construction of a CPU with all necessary memory represented in registers? [duplicate]

Modern CPUs employ a hierarchy of memory technologies. Registers, built into the chip have the lowest access times, but are expensive and volatile. Cache is a middle-man between RAM and registers to ...
6
votes
5answers
1k 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
3k 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 ...
6
votes
1answer
4k 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 ...
5
votes
5answers
607 views

Processing ADC conversion result: DMA vs Processor Registers

I have a periodic ADC conversion (every 50 micro-seconds) and I use the result to do some further calculations and update the PWM load registers. The ADC is triggered by the up-down counter of ...
5
votes
3answers
4k 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 "...
5
votes
3answers
3k views

What is the underlying 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 produced netlist? How one builds a flop which you can only write to and not read from?
5
votes
1answer
796 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
2answers
20k 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 ...
4
votes
1answer
2k 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
2k 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
1answer
182 views

Why is the stored value in each D flip flop reconnected to the input in a buffer register?

Like can one not just connect a single AND gate with the load and X input instead of complicating by reconnecting the output and using another OR gate? Will it be logically the same? or is it that I ...
4
votes
1answer
561 views

VHDL code and unintended latches

I am working on coding a Regsiter a1 with input signals b1,rst and wra1 the register ...
4
votes
2answers
3k 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 whereby ...
3
votes
2answers
884 views

What is this array-like notation of registers in datasheets?

I am reading BMP280 datasheet (pressure&temperature sensor). On different pages they use the following notation: $$register\text{_}name[a:b]$$ where a, b are integers. For example, on page 13 "...
3
votes
2answers
5k 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 ...
3
votes
1answer
2k 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 ...
3
votes
2answers
1k 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 ...
3
votes
3answers
2k 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 ...
3
votes
1answer
2k views

STM32F0 GPIOx_ODR vs GPIOx_BSRR

Apart from the register structure what is the difference between GPIOx_ODR and GPIOx_BSRR? Is GPIOx_BSRR an abstraction layer for GPIOx_ODR? I know that a change in GPIOx_BSRR "will" change the ...
3
votes
2answers
239 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
2answers
8k 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
1answer
118 views

What parts/sections of a CPU take the biggest number of transistors?

I was surprised to hear CPUs only have a number of ALUs. What are most of the transistors in a CPU dedicated to?
3
votes
1answer
132 views

Can I use a photodiode as a switch for a shift register?

Let's say I have a photodiode, a shift register (74HC595) and a 5V source, and I connect these as: 5V source -- photodiode -- shift register data input. (And other voltages to feed the register ...
3
votes
3answers
2k 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
81 views

Why do we need 'R_out' in 2-BUS arch?

Given some abstract architecture of CPU: Note that this CPU has 2-BUS. Why do we need the R_out and R_in? If I use Gra/Grb/Grc then obviousely I will need R_out. The Same for R_in when I use Sra/Srb/...
3
votes
4answers
1k views

8-bit shift register 74LS164 not working

I am trying to use an SN74LS164 8-bit serial-to-parallel shift register with my Raspberry Pi, but I have some problems. I connected: VCC, A, B and CLR to +5V GND to 0V CLK to Raspberry Pi GPIO ...
3
votes
1answer
225 views

Register behaving like latch in verilog

I have the following block of code - ...
3
votes
2answers
2k 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 ...
2
votes
2answers
1k views

Finite State Machine FSM

I understand how to make state diagram and make combinational logic (gates) to get a boolean equation for the next state bits and the output bit, but what is the function of ROM here ?
2
votes
2answers
2k views

Flip-flop vs latch: Do flip-flops have an edge detector integrated?

As far as I know, a latch and a flip-flop are the same excepting that flip-flop only "works" with an edge of the clock (let's supose rising edge for the question.) To make the flip-flop &...
2
votes
3answers
3k views

Does Registers and RAM are same kind of memory?

Recently, I found out a YT channel of a man who build a 8-bit computer and explain how. In his video on the registers, he uses a D flip-flop, and in his other video on the ram, I understood that he ...
2
votes
1answer
526 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
296 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
3k views

What is the meaning of “Register.Rd”?

Reading Hennessy'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
2k 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
5answers
129 views

I understand how D flip flop works but still not understand how it “store” a bit of data in a register in a running computer

I am reading this book "Computer Architecture and Organization" by Subrata Ghosal because I'm curious about how data is "stored" in the CPU register. When I say "data is ...
2
votes
1answer
908 views

Verilog register output: reg or wire?

If I want to model a simple register I would expect to have an internal 'reg' element to hold the value and I would connect this with a 'wire' output. The reg drives an internal output. However, I'...
2
votes
1answer
164 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. ...
2
votes
2answers
119 views

SN74HC595N Shift register output bizare

simulate this circuit – Schematic created using CircuitLab I'm using an 8-bit shift register on a very basic application for learning purposes, I have three buttons connected to SER, RCLK & ...
2
votes
1answer
545 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
4answers
1k 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 out ...

1
2 3 4 5