Questions tagged [register]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
49 views

STM32 UART Blocking Receiver Not Putting Data In Array, Overrun Flag

STM32F746 Disco, UART1 connected to ST-Link, Win 10, STM32CubeIDE, C, no HAL no other libraries other than CMSIS register definitions. Putty on Windows side to send and receive UART messages to/from ...
0
votes
2answers
112 views

How many times can a register bit be changed in AVR?

I am writing a program for an ATmega328P. I have a while loop inside which I am enabling the UART receiver complete interrupt flag using the command ...
0
votes
0answers
65 views

How to manipulate timer registers of Arduino Uno?

I already asked about How to achieve high speed microstepping? I even used Arduino Due to achieve high speed. Practically there was no difference compared to Uno but by changing baud rate I could see ...
0
votes
0answers
59 views

What is the cost of increasing the number of register names?

Increasing the number of registers in a CPU, has the upside that more values can be kept in registers instead of having to spill to stack. It has some downsides, one of which is that more instruction ...
2
votes
2answers
141 views

Will this register drawing work?

I have just learned about how logic gates work and I am trying to simulate a 1-bit register without using a clock signal. My design looks like this: The logic should work something like this (...
0
votes
1answer
66 views

Computers: How signals in the bus can travel in either direction [closed]

I'm reading J. Clark Scott's book But How Do It Know. When he is describing registers and the bus he illustrates this at one point as five registers sequentially parallel-connected to a bus. As you ...
0
votes
1answer
136 views

STM32 timer output compare interrupt all interrupt flags set at once

I'm trying to set up the output compare channels of TIM3 of an STM32F103RB MCU. For now I only enabled channel 1, but later I'll need CH2 and CH3 as well. When CH1 triggers, the TIM3->SR register ...
0
votes
1answer
48 views

Making a register from DFFs without using multiplexers

I am currently trying to design a 4-bit register that is optimised in terms of transistor count, since I will be laying it out in a larger circuit that is very limited in terms of chip space. My ...
0
votes
1answer
132 views

How to Use Modular Arithmetic in Verilog

I am trying to code the RC6 (Rivest cipher 6) algorithm using Verilog. The algorithm requires addition, subtraction and multiplication in modulo 232. I've been told that I can use conventional +, -, * ...
0
votes
1answer
69 views

Shared rising edge detector? [closed]

Why do we have a rising edge detector in every flip flop of a register. Can't we just make a shared one for all the flip flops in order to save hardware?
0
votes
3answers
129 views

A transistor and a diode instead of a tri-state buffer

I was wondering if it is possible to replace the tri-state buffer with a transistor and a diode as shown in the image. In this case a zero will be the same as high impedance. I don't understand why we ...
1
vote
1answer
117 views

Read data from a register in C-code [closed]

I am a beginner and learning by myself. I need your help to start the third implementation in my life in VIVADO ( "Hello world" and "led") I will implement SPI connection with DMA, ...
1
vote
3answers
250 views

What is the difference between register and memory?

I am currently studying the difference between microprocessors and microcontrollers and one of them says that: Microprocessors have less number of registers, so more operations are memory based. ...
2
votes
2answers
193 views

Microcontroller bit information for the Core and different peripherals

Usually, from what I have seen, Microcontroller have this information of 8-bit, 16-bit and 32-bit. In this Microcontroller S32K142, it is mentioned as 32-bit CPU. So, what does this actually mean? I ...
0
votes
3answers
434 views

SPI frequency for slave and master?

I have been trying to hook up ADE7758 with STM32F401, but I am having a problem understanding the frequency part of it. There is no minimum or maximum frequency for SPI CLK in the datasheet, and my ...
0
votes
0answers
34 views

Analog comparator ATMega164

I am using an ATMega164 chip and the circuit below On D5 and D6 I have connected the pins of a DC motor, which has to spin whenever the read voltage drops under a threshold. I read in the datasheet ...
0
votes
1answer
198 views

What is the triangle symbol in circuit diagrams?

What is the triagular symbols shown in the image, is it a buffer or some kind of delay?
2
votes
1answer
649 views

How to make a register in VHDL remember?

I was given the assignment to implement an 18-bit register in VHDL. I used an example from the book "Free Range VHDL" recommended to me earlier. Here's what I got: ...
0
votes
1answer
102 views

Which type of registers is used in CPU: serial or parallel? And how to implement them in VHDL?

I'm making a CPU in which the memory is represented as a two-dimensional array, using FPGA. I've come to the implementation of registers, and I need the answer to this question. I'm new to electronics,...
0
votes
3answers
100 views

Difference between latches and flip flops in datasheet

At university and several online searches (Difference between latch and flip-flop) I have been taught that the difference between a latch and a flip flop is that the latch is level triggered while the ...
0
votes
0answers
21 views

How do I read the value of registers in Logism?

I am designing a CPU in logism. One of the components of the CPU is a register circuit (RegFile), which stores the registers data. The register circuit (RegFile) is shown below: I am able to write ...
1
vote
0answers
33 views

ATMega32u4 Timer code not working

The following timer code running on a 8Mhz ATMega32u4 should toggle the onboard LED every second, and calling the ISR code manually does so. Yet, the ISR does not seem to get called. Could anyone ...
0
votes
1answer
364 views

g/LSB meaning in accelerometer measurements

I am not sure about the phrase I found here: https://www.engineersgarage.com/tutorials/adxl345-accelerometer-sensor-how-to-use/ Sensitivity – With the default resolution of 10-bit, the ADXL345 has ...
-2
votes
1answer
187 views

RiscV assembly, function arguments

I learnt that in RiscV assembly we save function arguments in registers s0,...,s7 but what if I had more that 8 arguments? Plus what about the case where I have more than 32 arguments (let's say 40) ...
0
votes
2answers
140 views

Is M1 Chip Memory Considered as Registers?

Given the following image of Apple's m1 chip, we can clearly see that RAM is so close to the CPU: does this say that RAM will be much faster when compared to others Macbook models (Since distance is ...
0
votes
1answer
63 views

Test benches in VHDL

I have a question about the 'correct' way to use test benches to test VHDL components in Vivado. To give you an idea of my task, I have a source file called Top_Level which is going to be the highest ...
1
vote
2answers
119 views

why there is a need to define temporary reg and only then assign to the output in verilog?

Following is the Verilog code for a 4-bit unsigned up counter with asynchronous clear as shown in ASIC.CO.IN: ...
1
vote
1answer
30 views

Will assigning a value to the W-reg in PIC16F84A during an interrupt, save it after the interrupt is disabled?

Okay so, I'm having this part of my program that needs a value to be checked to continue. basically, here is what it is doing: ...
0
votes
1answer
74 views

STM32L053R8 - Bare metal LED issues

I'm following a bare metal course, I have managed to set up the project within IAR, my project compiles and runs. I'm attempting to get the user LED (LD2) to flash before I continue the course. I'm ...
0
votes
3answers
555 views

XILINX Vivado VHDL using "printf"

In the C programming language, you can use printf to print out (for example) variables in the console window. I am using Vivado right now and programming with VHDL. ...
1
vote
0answers
20 views

Recover correct value from unstable memory through read operation

We are given a memory with 32-bit width for each word. it has the length (N - number of rows) which is not relevant for the question. we know that the memory has a problem where at any row, one bit ...
0
votes
0answers
36 views

A problem with designing a time register

I'm on a project where I need to design a time difference register. In a time register the time information is first converted to voltage, which is stored in a capacitor. Later, when we want the ...
4
votes
2answers
2k views

How can I access more than 15 addresses of data from my 8 bit incomplete computer?

Last year I started researching upon how computers work, so I started making one, at least on paper last month, but I ran into a serious problem that isn't getting a satisfying answer from any article ...
3
votes
5answers
704 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 ...
0
votes
2answers
371 views

Connecting input and output to the same bus

I'm reading "But how do it know". And in register chapter, it talks about connecting both input and output pins to a bus. I tried to do it on Logisim but it shows red wires. Can someone ...
3
votes
1answer
155 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?
-2
votes
1answer
58 views

Not getting correct results displayed from register

I am trying to input the numbers 1,0,3,2,32'hFFFFFFFF,32'h00000001 into the registers 0,1,2,3,6, and 7 respectively. I am doing this through always @(posedge clk) ...
0
votes
1answer
74 views

How to instantiate module with variables

I declared alu_result as a reg because I need it to be a variable data type for my case statement. But when i do this, I cannot pass it my ...
1
vote
0answers
160 views

How to cascade IC 74HC161 correctly?

Currently I have this 4 bit CPU as shown in the schematic diagram below. What I wish to achieve: Add one more output register to make the CPU output a total of 8 bits Show alphabet using the 8 bits ...
1
vote
2answers
89 views

How can I convert data from a sensor register to a float value?

Can anyone please help me understand how I can convert data from a sensor register to a float value? Say I am reading the sensor register as following: ...
3
votes
2answers
3k 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 &...
0
votes
3answers
285 views

Physical size of the registers for x86

We have an 8-bit register called CL on x86 CPU architecture. Does it mean that physically it contain 32 bits, but we have access only to lower 8 bits? Or does ...
0
votes
1answer
111 views

Why any modern CPU masks 5 lower bits in a CL register for shifting operations

I'm digging into left and right shift operations in ASM. From IA-32 Intel Architecture Software Developer’s Manual 3 All IA-32 processors (starting with the Intel 286 processor) do mask the ...
0
votes
1answer
338 views

How do I use a 4-bit Adder, 4-1 MUX, and 2-1 MUX to implement various micro-operations on registers?

One of the exercises in my Logic Design coursebook requires me to create a circuit that handles following micro-operations on 4-bit registers R1 and R2. R1 + R2 R1 - R2 R2 – R1 R1 – 1 -(R1 + 1) 0 -1 ...
1
vote
0answers
43 views

Vivado is not properly gating my registers?

I have a register which holds 12 bits written in VHDL within Vivado which is not being gated properly. The code is very simple, and is as follows: ...
1
vote
2answers
155 views

Is it possible to have a register with multiple drivers?

This is just a theoretical question I have. Imagine we have a register (a reg signal in Verilog for example) and two possible inputs that have to write to that register. I am assuming all signals are ...
1
vote
1answer
243 views

What happens when a program needs to use more than the allotted 16 registers?

I'm just learning about how programs work under the hood of a computer. We discussed how registers are a limited resource to the CPU. So what happens when a program is massive and needs more than 16 ...
1
vote
2answers
128 views

SN74LS245N outputs 1 Volt when OE is high, 0 Volts when OE is low

We have been making a Register. When we write all ones, it works fine. When we enable it back onto the bus using 74LS245, it doesn't enable. We used our Multimeter to measure the volts. It seems to ...
0
votes
1answer
73 views

Guidance on programming control registers in a device (DAC)?

I need to program audio DAC chip registers, I know it is controlled through I2C pins but other than that im clueless. DAC is Ak4493 First off what options are there of devices to control it? e.g are ...
2
votes
3answers
684 views

How can a 4-bit CPU have 40 instructions?

Currently, I am using Logisim(yes, still Logisim) to build a 4-bit variant of the 8-bit SAP-1 microcomputer. However, I ran into a problem with the instruction register. Let me explain. The SAP-1 has ...

1
2 3 4 5 6