Suppose we have a direct-mapped cache that can hold a total of 1024
blocks with 4 words per block.
Compute the block index, block offset, and the tag for the
following addresses:
(a) 0x11001001
(b) 0x00010014
(c) 0x01000004
(d) 0x01001018
(e) 0x7bdcca10
In: Electrical Engineering
We want to design a simple "four clock pulse" timer circuit. In addition to the clock input, the timer has a "Restart" input (R), three "data" outputs (ABC) which indicate the count, and one "beeper" output (D). The behavior of the circuit is as follows:
Idle Mode The timer output is ABC=100 and the beeper is off (D=0) as long as R=0. If R=1 on any clock edge in this mode, the timer goes into the...
Restart/Hold Mode The timer output is ABC=000 and
the beeper is off (D=0) as long as R=1. If R=0 on any clock edge in
this mode, the timer goes into the...
Counting Mode Provided that the counter is not
restarted (i.e. provided that R=0), the timer goes through the
sequence of data and beeper outputs shown below (one full clock
pulse each) and then returns to the Idle mode. If R=1 on any clock
edge in this mode, the timer goes into the Restart/Hold mode.
A | B | C | D |
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 0 |
1 |
Use D-flops, AND gates, OR gates, and inverters to design a Moore machine that performs this function. No more than 3 D-type flip-flops should be used. Carry out your solution as follows:
(a) How many states does this timer have? Make a list of these states, giving each a label and a verbal description. How many bits are required to specify all states? Name the state bits and assign values to each for every state.
(b) Construct a complete state table for this machine, including all inputs, outputs, and states. Include any don't-care conditions.
(c) Construct a state diagram for this machine.
(d) How many signals must be generated by combinational logic for this machine? What are they? Use Karnaugh maps to obtain minimized Boolean expressions for these signals.
(e) Draw a complete circuit diagram for your state machine, showing all inputs and outputs, flip-flops, combinational circuits, and interconnects.
In: Electrical Engineering
1. In single-phase circuits test, consider the instantaneous power waveforms. How is the value of the real power obtained in the software? What is the significance of the instantaneous power going negative (consider direction of power flow and reactive power)?
2. For each of the resistive, inductive and capacitive loads (loads 1-3), comment on whether the current waveform is smoother, noisier or the same shape as the voltage waveform. Explain the results using the following, for a resistor i = v/R, for an inductor, the current is proportional to the integral of the voltage , while in a capacitor, the current is proportional to the derivative of the voltage.
3.
Device |
Acquired Parameters |
Calculated Parameters |
||||||
Vrms (V) |
Irms (A) |
P (W) |
S (VA) |
Q (VAr) |
cos q |
R (W) |
X (W) |
|
1. Resistor R, (50W, D.C. Board) |
62.7 |
1.17 |
73.5 |
73.359 |
j4.55 |
1.0019 |
53.69 |
j3.324 |
2. Inductor L, 10A |
61.8 |
0.87 |
4 |
53.766 |
53.617 |
0.0744 |
5.285 |
70.834 |
3. Capacitor C, 18mF |
62.5 |
0.36 |
-0.1 |
22.5 |
-22.50 |
-0.004 |
-0.772 |
-173.6 |
Calculate the inductance and capacitance (showing your working) corresponding to the calculated reactances in rows 2 and 3 of Table 3. Compare the calculated capacitance to its nominal value.
4. Show the formulas (e.g. Z1//Z3, you do not need to show your working) you would use to calculate the impedance for loads 4 to 6 in terms of the impedance of loads 1 to 3.
In: Electrical Engineering
Write a program to remove an element from an array at the given position k and push the rest of the array elements one position back. Then insert the removed element at the beginning. Position k is entered through keyboard. For example, if the original array x is {'r', 'c', 'm', '7', 'w', '3', 'q'} and k = 3, the array will be changed to {'7', 'r', 'c', 'm', 'w', '3', 'q'}. Hint: Sequence of moving the element is important. You need to define a temp variable to hold value of x[k] before you move the rest of the array elements one position back. Finally, put the saved temp variable to the first element of the array. (in C please)
In: Electrical Engineering
Draw the two transistor equivalent circuit of the SCR and explain its operation?
In: Electrical Engineering
For PIC16F1619, how does the TIMER0 prescalar work? If we set PS2 = 0, PS1 = 0, and PS0 = 1 in the OPTION_REG register, how often does TIMER0 generate an interrupt?
In: Electrical Engineering
Name four ways to improve the integration of variable wind and solar resources.
In: Electrical Engineering
Consider that you desire a digital transmission system, such that the quantization distortion of any audio source does not exceed ±2% of the peak-to-peak analog signal voltage. a. If the audio signal bandwidth and the allowable transmission bandwidth are each 4000Hz. And the sampling takes place at Nyquist rate, what value of bandwidth efficiency (bits/s/Hz) is required. b. Repeat part (a) except that the audio signal bandwidth is 20kHz (high fidelity), yet the available transmission bandwidth is still 4000Hz.
In: Electrical Engineering
The code below takes in values from LDR but only one LED is lit. The other 3 LEDs are always off. What can I do to correct this ?
#include "mbed.h"
AnalogIn ADC(A5);
BusOut myLEDs(D10, D11, D12, D13); //Using Bus out instead of DigitalOut for Group of signals in order to control multiple outputs
PwmOut Led1(D10);
PwmOut Led2(D11);
PwmOut Led3(D12);
PwmOut Led4(D13);
int main(void)
{
while(1)
{
float brightness;
//LEDs.period(1);
brightness= 1-ADC.read();
float I_val;
I_val =brightness*100;//Intensity value= I_val
printf("light Level =%3.1f%%\n", I_val);//maximum of 5 significant figures and maximum of 2 decimal places.
wait(1);
Led1.period(1.0f);//period to be 1 second
Led2.period(1.0f);
Led3.period(1.0f);
Led4.period(1.0f);
if(I_val<25)
{
Led1.write(0.0f); //duty cycle as 20% of 1 period (1 second)
Led2.write(0.0f);
Led3.write(0.0f);
Led4.write(0.0f);
break;
}
else if(I_val >=25 && I_val <50)
{
Led1.write(0.25f);
Led2.write(0.25f);
Led3.write(0.25f);
Led4.write(0.25f);
break;
}
else if(I_val >=50 && I_val <75)
{
Led1.write(0.50f);
Led2.write(0.50f);
Led3.write(0.50f);
Led4.write(0.50f);
break;
}
else if (I_val >=75 && I_val<100)
{
Led1.write(0.75f);
Led2.write(0.75f);
Led3.write(0.75f);
Led4.write(0.75f);
break;
}
else if (I_val == 100)
{
Led1.write(1);
Led2.write(1);
Led3.write(1);
Led4.write(1);
break;
}
else if (I_val<0 && I_val >100)
{
printf("ERROR!");
}
}
}
The task is to use mbed library with Nucleo 64 bits STM32f303RE ARM board and the four red leds as lighting devices. There are five required levels of lighting, 1, 2, 3, 4 and off. The lighting level is controlled by the lightness/darkness detected by the LDR sensor, for example when it is very light, all the leds will be off, and when it is very dark all the four leds will be on. All the 5 levels of lighting will be corresponded to the evenly distributed ‘ReadIn’ value from the LDR. PWM control is not required for this task.
That is,
[1.] when the darkness corresponding to 25% then one of the 4 led will be lit with 25% of duty cycle and
[2.] when darkness is equivalent to 50% then the 2 of 4 LEDs will be lit with 50% duty cycle and
[3.] when when darkness corresponds 75% then 3 of 4 LEDs will be lit with 75% duty cycle and
[4.] with complete darkness all the 4 LEDs with be lit with 100% duty cycle of brightness
In: Electrical Engineering
In assembly
1.What is the effect of the following instructions executing on a modern x86 64-bit system (describe what happens and the final contents of the registers involved)? Can you obtain the same end result using only two instructions, and no other registers?
PUSH RAX
PUSH RBX
PUSH RCX
XOR RAX,RAX
XOR RBX,RBX
XOR RCX,RCX
POP RAX
POP RAX
POP RBX
2. What is the purpose of a segment register in protected mode memory addressing?
3. For a 32-bit Pentium4 descriptor that contains a base address of 01000000H, a limit of 0FFFFH, and G=0, what starting and ending locations are addressed by it? (also see Segmentation and Pagination Diagrams in BlackBoard, Other Reference Materials).
4. If DS=0105H in protected mode, which descriptor entry, table, and RPL are selected? (also see Segmentation and Pagination Diagrams in BlackBoard, Other Reference Materials).
5. What is the purpose of the TLB located within the Pentium class microprocessor?
In: Electrical Engineering
A PIC C code for Interfacing Ultrasonic sensor using
PIC C 18F8722 microcontroller
In: Electrical Engineering
Create a 4-bit full adder design using VHDL in vivado 2017.2.
Project description: You need to create a vhd file for the four-bit full adder.
Note: Instead of using bit, please use std_logic; instead of using bit_vector, please use std_logic_vector.
One simulation source is required, i.e. testbench
Please don't write out on paper. Code written out in text or screen shots would be very much apprecitated.
In: Electrical Engineering