Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
5 views
ACA compre cheat
advance architecture
Uploaded by
Venkata Akash Mandla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF, TXT or read online on Scribd
Download now
Download
Save ACA compre cheat For Later
Download
Save
Save ACA compre cheat For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
5 views
ACA compre cheat
advance architecture
Uploaded by
Venkata Akash Mandla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF, TXT or read online on Scribd
Download now
Download
Save ACA compre cheat For Later
Carousel Previous
Carousel Next
Save
Save ACA compre cheat For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 2
Search
Fullscreen
Inst.
opcode ALUOp I operation Funct field ALU action ALUCtrl
100010 (LW) 00 load word xxxxxx add 0010
100011 (SW) 00 store word xxxxxx add 0010
000100 (BEQ) 01 branch equal xxxxxx subtract 0110
000000 (R-typ) 10 add 100000 add 0010
R-type 10 Subtract 100010 subtract 0110
R-type 10 AND 100100 AND 0000
R-type 10 OR 100101 OR 0001
R-type 10 slt 101010 slt 0111
001000 (addi) 00 Immediate xxxxxx add xxxx
000010 (j) xx jump xxxxxx jump xxxx
cycles cycleshit cyclesmiss
CPI = = +
inst inst inst
cycleshit cycles miss
= +
inst miss inst
cycleshit
= + Miss _ penalty Miss _ rate
inst
######zerone ########fibbb######## prompt: .asciiz "Enter the prediction = 1; } for (int i = 0; i < if (outcome) { return 0; }} &address) != EOF) {
`include .data n: " return prediction;} N_ROWS_BTB; i++) { predictStat[indxBTB][1]++; if (branchPredictor[pc] int calculateCacheHitRate() accessCache(address); }
"system_under_test.v" Entervalue:.asciiz "Enter a element_prompt:.asciiz void predictStat[i] = (int } < (1 << N_BITS) - 1) { int hits = 0; fclose(traceFile); return 0; }
`timescale 1ns / 1ps number (N): " "Enter ele" updateNbitPredictor(int n, *)malloc(2 * sizeof(int)); branchPredictor[pc]++; int totalAccesses = 1000; void initializeCache(int
module testbench(); isFibMsg:.asciiz " Given newline: .asciiz "\n" int *currState, int predictStat[i][0] = 0; predictStat[indxBTB][0]++; } else { if for (int i = 0; i < cacheSize, int blockSize) {
reg clk; number is a Fibonacci array: .space 100 actualOutcome) { predictStat[i][1] = 0; } } (branchPredictor[pc] > 0) totalAccesses; i++) { int numBlocks = cacheSize /
reg [1:0] in_data; number " .text int maxState, pivotState; fp = #######branchless c#### branchPredictor[pc]--; hits += blockSize; for (int i = 0; i <
wire out; notFibMsg:.asciiz " Given main: maxState = pow(2, n) - 1; fopen(BOUTCOME_FILE, #include <stdio.h> }} getCacheEntryStatus(); } numBlocks; i++) {
system_under_test dut ( number is not a Fibonacci li $v0, 4 pivotState = maxState / 2; "r"); int main() { int hitRate = (hits * 100) cache[i].valid = 0;
.clk(clk), number." la $a0, prompt if (actualOutcome == 1) { predictStat = (int void countAndPrint(int initPredictor(); / totalAccesses; cache[i].tag = -1;
.in_data(in_data), positionInd:.asciiz " and its syscall if (*currState < **)malloc(pow(2, *sets, int size, int item) { FILE *fp; return hitRate;} cache[i].sctr = 0; } }
.out(out) Position Index in Fibonacci li $v0, 5 maxState) { *currState = N_BITS_PC_2LEVEL) * int countLarger = 0; fp = fopen("btrace.txt", int main() { void accessCache(int
); sequence is : " syscall *currState + 1; } sizeof(int *)); int countSmaller = 0; "r"); if (fp == NULL) { printf("Cache entry address) { int tag = address
always #5 clk = ~clk; .text move $t1, $v0 } else { for (int i = 0; i < pow(2, printf("Error opening status: %s\n", / blockSize; int index = tag
initial begin main: li $t0, 0 if (*currState > 0) { N_BITS_PC_2LEVEL); i++) { for (int i = 0; i < size; i++) file.\n"); getCacheEntryStatus() ? % (cacheSize / blockSize); if
clk = 1; li $v0, 4 la $t2, array *currState = *currState predictStat[i] = (int { return 1; } "Hit" : "Miss"); (cache[index].valid &&
in_data = 2'b00; la $a0, Entervalue read_loop: - 1;}}} *)malloc(2 * sizeof(int)); int diff = sets[i] - item; int pc, outcome; printf("Cache hit rate: cache[index].tag == tag) {
#10 in_data = 2'b01; syscall beq $t0, $t1, print_array //2bitpredictor predictStat[i][0] = 0; countLarger += (diff >> while (fscanf(fp, "B %d%%\n", updateSctr(tag, 1); } else {
#10 in_data = 2'b10; li $v0, 5 addi $t3, $t0, 1 int **LHT_2Level = NULL; predictStat[i][1] = 0; } 31) & 1; %d\t%d", &pc, &outcome) calculateCacheHitRate()); replaceBlock(address); } }
#10 in_data = 2'b11; syscall li $v0, 4 void initLHT2Level(void) { initBTB(); countSmaller += (~diff != EOF) { return 0;} void updateSctr(int tag, int
#10 $finish; move $t0, $v0 la $a0, element_prompt int noEntry = pow(2, initLHT2Level(); >> 31) & 1; } int prediction = #######hybridcache2bsctr hit) { int index = tag %
end li $t1, 0 syscall N_BITS_PC_2LEVEL); BTBLastIndx = -1; printf("Number of getPrediction(pc); #include <stdio.h> (cacheSize / blockSize); int
always @(posedge clk) li $t2, 1 li $v0, 5 int noInfo = 2; //[0] for while (1) { elements larger than %d: updatePred(pc, #include <stdlib.h> sctr = cache[index].sctr; if
begin li $t3, 1 syscall histroy and [1] for BPs fscanf(fp, "%x", &pc); %d\n", item, countLarger); outcome); } #define MAX_CACHE_SIZE (hit) { if (sctr < 3) {
$display("Time: %0t, li $t4, 2 sw $v0, 0($t2) LHT_2Level = new int fscanf(fp, "%s", printf("Number of fclose(fp); 1024 cache[index].sctr++; } } else
Output: %b", $time, out); check_fibonacci: addi $t2, $t2, 4 *[noEntry]; outcome); elements smaller than %d: return 0; } #define MAX_BLOCK_SIZE { if (sctr > 0) {
end beq $t0, $t3, addi $t0, $t0, 1 for (int i = 0; i < noEntry; if (fgetc(fp) == EOF) %d\n", item, ########### percOfhits## 64 cache[index].sctr--; } } }
endmodule found_fibonacci j read_loop i++) { break; countSmaller);} #include <stdio.h> typedef struct { int valid; int selectBlockToReplace() {
system: bgt $t3, $t0, not_fibonacci print_array: LHT_2Level[i] = new indxBTB = int main() { #define CACHE_SIZE 256 int tag; int sctr; } int minSctr = 4; int
module system_under_test add $t1, $t2, $t3 li $t0, 0 int[noInfo]; searchIndxBTB(pc); int sets[] = {3, 5, 8, 2, 10, #define BLOCK_SIZE 4 CacheEntry; indexToReplace = -1; for
( move $t2, $t3 la $t2, array LHT_2Level[i][0] = 0; indxLHT = 6}; #define MEMORY_SIZE CacheEntry (int i = 0; i < cacheSize /
input wire clk, move $t3, $t1 print_loop: // assigning the history as getTableIndx(pc); int size = sizeof(sets) / 65536 cache[MAX_CACHE_SIZE / blockSize; i++) { if
input wire [1:0] in_data, addi $t4, $t4, 1 bge $t0, $t1, exit 0s if (indxBTB == -1) { sizeof(sets[0]); #define ADDRESS_WIDTH MAX_BLOCK_SIZE]; (!cache[i].valid) { return i; }
output wire out j check_fibonacci lw $a0, 0($t2) LHT_2Level[i][1] = BTBLastIndx = int item = 5; 16 int cacheSize, blockSize; if (cache[i].sctr < minSctr) {
); found_fibonacci: li $v0, 1 initStateLBP; // assigning (BTBLastIndx + 1) % countAndPrint(sets, size, typedef struct { void initializeCache(int minSctr = cache[i].sctr;
reg [1:0] counter; li $v0, 4 syscall the initial value, N_ROWS_BTB; item); int tag; cacheSize, int blockSize); indexToReplace = i; } }
always @(posedge clk) la $a0, isFibMsg li $v0, 4 initStateLBP, to each BTB[BTBLastIndx][0] = return 0;} char block[BLOCK_SIZE]; void accessCache(int return indexToReplace; }
begin syscall la $a0, newline predictors. }} pc; #####c code get_pred # int valid; address); void replaceBlock(int
if (in_data[0] == 1'b1) li $v0, 4 syscall void updateLHT2Level(int indxBTB = BTBLastIndx; #include <stdio.h> } CacheLine; void updateSctr(int tag, int address) { int tag = address
begin la $a0, positionInd addi $t2, $t2, 4 indx, int outcome) { } #include <stdlib.h> CacheLine hit); / blockSize; int
counter <= counter + 1; syscall addi $t0, $t0, 1 int temp; intOutcome = #define MAX_SIZE 1000 cache[CACHE_SIZE]; int selectBlockToReplace(); indexToReplace =
end li $v0, 1 j print_loop LHT_2Level[indx][0] = outcome[0] == 'T' ? 1 : 0; #define N_BITS 2 char void replaceBlock(int selectBlockToReplace();
if (in_data[1] == 1'b1) move $a0, $t4 exit: (LHT_2Level[indx][0] >> 1) predictOutcome = int memory[MEMORY_SIZE]; address); cache[indexToReplace].vali
begin syscall li $v0, 10 + (outcome << 2);} getPrediction(2, branchPredictor[MAX_SIZE unsigned int int main() { cacheSize = d = 1;
counter <= counter + 1; li $v0, 10 syscall void LHT_2Level[LHT_2Level[ind ];void initPredictor() { getCacheEntryStatus(void) 512; blockSize = 32; cache[indexToReplace].tag
end syscall ################pred twoLevelBranchPredictor() xLHT][0]][1]); for (int i = 0; i < { unsigned int address; initializeCache(cacheSize, = tag;
not_fibonacci: int getPrediction(int n, int { char outcome[4]; updateNbitPredictor(2, MAX_SIZE; i++) { address = 0x1234; blockSize); FILE *traceFile; cache[indexToReplace].sctr
if (in_data == 2'b00) li $v0, 4 currState) { int pc, indxBTB, indxLHT, &LHT_2Level[LHT_2Level[i branchPredictor[i] = 0; unsigned int index = char filename[] = = 0; }
begin la $a0, notFibMsg int maxState, pivotState, getCurState, intOutcome, ndxLHT][0]][1], }} address % CACHE_SIZE; "cache_trace.bxt";
counter <= 0; syscall prediction; predictOutcome; intOutcome); int getPrediction(int pc) { unsigned int tag = traceFile = fopen(filename,
end li $v0, 10 maxState = pow(2, n) - 1; int **predictStat = NULL; return address / CACHE_SIZE; "r"); if (traceFile == NULL) {
end syscall pivotState = maxState / 2; predictStat = (int updateLHT2Level(indxLHT, branchPredictor[pc] >= (1 if (cache[index].valid && printf("Error opening trace
assign out = (counter % 2 #########array# if (currState <= pivotState) **)malloc(N_ROWS_BTB * intOutcome); << (N_BITS - 1)); cache[index].tag == tag) { file.\n"); return 1; } int
== 0) ? 1'b1 : 1'b0; .data { prediction = 0; sizeof(int *)); if (predictOutcome == }void updatePred(int pc, int return 1; address; while
endmodule } else { intOutcome) { outcome) { } else { (fscanf(traceFile, "%d",
You might also like
8 Bit ALU Design in Modelsim Using Verilog With Code and Test Bench
PDF
60% (5)
8 Bit ALU Design in Modelsim Using Verilog With Code and Test Bench
17 pages
A Complete 8-Bit Microcontroller in VHDL
PDF
100% (1)
A Complete 8-Bit Microcontroller in VHDL
29 pages
Computer Architecture: Nguyễn Trí Thành
PDF
No ratings yet
Computer Architecture: Nguyễn Trí Thành
101 pages
M3-ALU-Design
PDF
No ratings yet
M3-ALU-Design
81 pages
L12 Sglcycle Datapath
PDF
No ratings yet
L12 Sglcycle Datapath
69 pages
Control: Control Unit Takes Input From
PDF
No ratings yet
Control: Control Unit Takes Input From
29 pages
Lect5 Single Cycle Control
PDF
No ratings yet
Lect5 Single Cycle Control
29 pages
MIPS_alu_version1
PDF
No ratings yet
MIPS_alu_version1
2 pages
Unit 3.2 Cental Processing Unit
PDF
No ratings yet
Unit 3.2 Cental Processing Unit
30 pages
Chapter 5 - The Processor: Datapath and Control
PDF
No ratings yet
Chapter 5 - The Processor: Datapath and Control
101 pages
Central Processing Unit
PDF
No ratings yet
Central Processing Unit
7 pages
Ch8, Central Processing Unit
PDF
No ratings yet
Ch8, Central Processing Unit
61 pages
Lec12-Processor Control I
PDF
No ratings yet
Lec12-Processor Control I
9 pages
5Singlecycle Control
PDF
No ratings yet
5Singlecycle Control
23 pages
L11 PDF
PDF
No ratings yet
L11 PDF
31 pages
ALU CODE and TEST BENCH
PDF
No ratings yet
ALU CODE and TEST BENCH
8 pages
Verilog Code For The ALU
PDF
No ratings yet
Verilog Code For The ALU
4 pages
PES1UG23EC217
PDF
No ratings yet
PES1UG23EC217
10 pages
Unit 3
PDF
No ratings yet
Unit 3
10 pages
CAO Unit-II
PDF
No ratings yet
CAO Unit-II
76 pages
Group 1 DLD Project Report
PDF
No ratings yet
Group 1 DLD Project Report
14 pages
1 2. Objective 2 3. System Description and Design 3 4. Codes 9 5. Simulation Results 18 6. Conclusion 19 7. References 20
PDF
No ratings yet
1 2. Objective 2 3. System Description and Design 3 4. Codes 9 5. Simulation Results 18 6. Conclusion 19 7. References 20
21 pages
assignmnt_code
PDF
No ratings yet
assignmnt_code
5 pages
PES1UG23EC217
PDF
No ratings yet
PES1UG23EC217
11 pages
Unit 2
PDF
No ratings yet
Unit 2
69 pages
Arithmetic
PDF
No ratings yet
Arithmetic
3 pages
ALUDDCO
PDF
No ratings yet
ALUDDCO
15 pages
Verilog Implementation of Single Cycle Microprocessor
PDF
No ratings yet
Verilog Implementation of Single Cycle Microprocessor
13 pages
VHDL Project
PDF
No ratings yet
VHDL Project
6 pages
5. Building a data path
PDF
No ratings yet
5. Building a data path
61 pages
Devanshverilog
PDF
No ratings yet
Devanshverilog
8 pages
Unit 4
PDF
No ratings yet
Unit 4
31 pages
CA
PDF
No ratings yet
CA
12 pages
CHAPTER 6 - Teacher
PDF
No ratings yet
CHAPTER 6 - Teacher
32 pages
Prgms From Report
PDF
No ratings yet
Prgms From Report
54 pages
Best College Kharian: Prof: Ali Subtain
PDF
No ratings yet
Best College Kharian: Prof: Ali Subtain
5 pages
Assignment-5 by Kaneria Dhaval: Verilog Code For Single Cycle Processor
PDF
No ratings yet
Assignment-5 by Kaneria Dhaval: Verilog Code For Single Cycle Processor
12 pages
Lab 2
PDF
No ratings yet
Lab 2
10 pages
Report On Special Assignment "Implementation of 8-Bit ALU On SPARTAN-3"
PDF
100% (6)
Report On Special Assignment "Implementation of 8-Bit ALU On SPARTAN-3"
18 pages
7808_et_et
PDF
No ratings yet
7808_et_et
14 pages
A Complete 8-Bit Microcontroller in VHDL - FPGA4student
PDF
No ratings yet
A Complete 8-Bit Microcontroller in VHDL - FPGA4student
20 pages
Arithmetic Woloop
PDF
No ratings yet
Arithmetic Woloop
3 pages
Computer Organization and Architecture
PDF
No ratings yet
Computer Organization and Architecture
108 pages
Chap5 Processor Part-II
PDF
No ratings yet
Chap5 Processor Part-II
21 pages
CAAL S25 L10-29275
PDF
No ratings yet
CAAL S25 L10-29275
5 pages
Lecture07 Control Signals
PDF
No ratings yet
Lecture07 Control Signals
18 pages
Reportvish Merged Removed Removed
PDF
No ratings yet
Reportvish Merged Removed Removed
28 pages
Lecture 1.1.4 (Computer Hardware Components - ALU, Registers, Memory)
PDF
No ratings yet
Lecture 1.1.4 (Computer Hardware Components - ALU, Registers, Memory)
5 pages
Digital Circut Design . Project
PDF
No ratings yet
Digital Circut Design . Project
14 pages
Chapter - Instruction List (IL) Programming
PDF
No ratings yet
Chapter - Instruction List (IL) Programming
7 pages
pipelined core
PDF
No ratings yet
pipelined core
16 pages
Chapter 3 Lecture 1 Central Processing Unit
PDF
No ratings yet
Chapter 3 Lecture 1 Central Processing Unit
37 pages
ALU Design
PDF
No ratings yet
ALU Design
6 pages
L8 CPU ALU B Class
PDF
No ratings yet
L8 CPU ALU B Class
16 pages
Arithmetic Logic Unit
PDF
No ratings yet
Arithmetic Logic Unit
5 pages
ALU - Verification With UVM
PDF
No ratings yet
ALU - Verification With UVM
17 pages
Lab2 and Lab3
PDF
No ratings yet
Lab2 and Lab3
15 pages
Chapter 1lecture 1.3 (Computer Hardware Components) Notes+Homework+References+videoLink
PDF
No ratings yet
Chapter 1lecture 1.3 (Computer Hardware Components) Notes+Homework+References+videoLink
6 pages
Computer Engineering Laboratory Solution Primer
From Everand
Computer Engineering Laboratory Solution Primer
Karan Bhandari
No ratings yet
Amazing Java: Learn Java Quickly
From Everand
Amazing Java: Learn Java Quickly
Andrei Besedin
No ratings yet
Question Bank Answers
PDF
No ratings yet
Question Bank Answers
5 pages
Sensorless ACIM Field-Oriented Control: Design Reference Manual
PDF
No ratings yet
Sensorless ACIM Field-Oriented Control: Design Reference Manual
40 pages
Confined Space Entry Permit ACC Jamul
PDF
No ratings yet
Confined Space Entry Permit ACC Jamul
1 page
Maintaining Military Vehicles
PDF
No ratings yet
Maintaining Military Vehicles
2 pages
Infrared_Thermography 20 Pages
PDF
No ratings yet
Infrared_Thermography 20 Pages
7 pages
Fresh Air Louver Selection - 11-10-2015
PDF
No ratings yet
Fresh Air Louver Selection - 11-10-2015
1 page
Aadhaar Payments Bridge (APB) System SOP - V3.0.3
PDF
No ratings yet
Aadhaar Payments Bridge (APB) System SOP - V3.0.3
31 pages
AWS Certified Developer - Associate Exam Dumps With PDF and VCE Download (1-30)
PDF
No ratings yet
AWS Certified Developer - Associate Exam Dumps With PDF and VCE Download (1-30)
2 pages
Technical Feasibility
PDF
No ratings yet
Technical Feasibility
3 pages
Basic Calculus Achievement Exam Reviewer
PDF
No ratings yet
Basic Calculus Achievement Exam Reviewer
32 pages
How To Access An AXE
PDF
100% (2)
How To Access An AXE
20 pages
Earthing
PDF
No ratings yet
Earthing
19 pages
5G New Radio Key Performance Indicators Evaluation For IMT-2020 Radio Interface Technology
PDF
No ratings yet
5G New Radio Key Performance Indicators Evaluation For IMT-2020 Radio Interface Technology
21 pages
RIM2000-RIM5000 en
PDF
No ratings yet
RIM2000-RIM5000 en
9 pages
Architect Business Plan
PDF
No ratings yet
Architect Business Plan
38 pages
Practice For Exam
PDF
No ratings yet
Practice For Exam
2 pages
Correlation Coefficient
PDF
No ratings yet
Correlation Coefficient
5 pages
Ailet 2020 Analysis: Law With Rashi Dubey
PDF
No ratings yet
Ailet 2020 Analysis: Law With Rashi Dubey
4 pages
Online Food Ordering Final Mohit
PDF
No ratings yet
Online Food Ordering Final Mohit
55 pages
1 Sieve Analysis of Aggregates - MIOTEN
PDF
No ratings yet
1 Sieve Analysis of Aggregates - MIOTEN
20 pages
2.4.1.2 Packet Tracer - Skills Integration Challenge Instructions
PDF
100% (1)
2.4.1.2 Packet Tracer - Skills Integration Challenge Instructions
1 page
A Simple Guide To Centroid Based Clustering (With Python Code)
PDF
No ratings yet
A Simple Guide To Centroid Based Clustering (With Python Code)
25 pages
Big Bay Bei Final Round 2020 P6
PDF
100% (2)
Big Bay Bei Final Round 2020 P6
15 pages
Continuous Butter Making Machine Contimab Proflex: Capacity Between 200 and 13,000 Kg/hour of Butter
PDF
No ratings yet
Continuous Butter Making Machine Contimab Proflex: Capacity Between 200 and 13,000 Kg/hour of Butter
2 pages
On Cyclic Dna Codes Over The Rings Z4 + Wz4 and Z4 + Wz4 + Vz4 + Wvz4
PDF
No ratings yet
On Cyclic Dna Codes Over The Rings Z4 + Wz4 and Z4 + Wz4 + Vz4 + Wvz4
12 pages
lma11-01-pef-20220113
PDF
No ratings yet
lma11-01-pef-20220113
10 pages
Aman Yadav - 10 Years
PDF
No ratings yet
Aman Yadav - 10 Years
2 pages
Existing Data Based Research
PDF
No ratings yet
Existing Data Based Research
2 pages
Simple Machines
PDF
No ratings yet
Simple Machines
20 pages
Ansul: Inergen 150 Bar Systems
PDF
No ratings yet
Ansul: Inergen 150 Bar Systems
140 pages