Chat with us, powered by LiveChat Instructions:??? Embedded Systems Tools and Models - Lab 2 Completion Date: 14 ?of December 2018 Value: 12 marks Q1. Explain briefly how the code here https://balau82.wordpr | Wridemy

Instructions:??? Embedded Systems Tools and Models – Lab 2 Completion Date: 14 ?of December 2018 Value: 12 marks Q1. Explain briefly how the code here https://balau82.wordpr

   

Embedded Systems
Tools and Models – Lab 2
Completion Date: 14
 of December 2018
Value: 12 marks
Q1.
Explain briefly how the code here
https://balau82.wordpress.com/2010/11/30/emulating-arm-pl011-serial-
ports/ uses the pl101 DR and FR registers to transmit and receive data over the associated UART peripheral of the Versatilepb board.
Q2
Give a brief overview of the clang generated Abstract Syntax Tree (AST) for the
while loop of the attached t2.c file. The attached t2.ast file from line 25 to line 53
shows a dump of the WhileStmt node and its children which corresponds to the
while loop. The t2.ast file was generated using:
clang-check -ast-dump t2.c –extra-arg="-fno-color-diagnostics" >t2.ast
Clang/LLVM is a framework for the compilation and analysis of source code
written is several different programming languages. Clang provides many tools for the manipulation of its ASTs. See the video linked in this tutorial for details https://jonasdevlieghere.com/understanding-the-clang-ast/.
In this case we use clang to generate an AST for a given simple c function fred().
We use the -ast-dump command line argument to generate a textual
representation of the AST, which is stored in the file t2.ast. Each node in the AST
models a particular language construct. For example, the VarDecl class models a c declaration of a variable.
For instance, the c statement in the file t1.c:
int i,j=0;
is modeled in the AST as two VarDecl nodes and one IntegerLiteral node which
are in the t2.ast from line 15 to line 18:
-VarDecl 0x1c08820 <col:1, col:5> col:5 used i 'int'
-VarDecl 0x1c08890 <col:1, col:9> col:7 used j 'int' cinit
 -IntegerLiteral 0x1c088f0 <col:9> 'int' 0
If a c variable is used in an expression in t2.c, the AST will have a corresponding
DeclRefExpr node to model that use.
For example, the c statement:
j = 0;
will be modeled using the following AST nodes (dumped using the -ast-dump flag
to the compiler):
BinaryOperator 0x1c089f8 <line:4:1, col:3> 'int' '='
 | |-DeclRefExpr 0x1c089b0 <col:1> 'int' lvalue Var 0x1c08890 'j' 'int'
 | `-IntegerLiteral 0x1c089d8 <col:3> 'int' 0
Q3
The attached code (testbench.c and peak.c) is a testbench and a state machine
implementation of the peak constraint
http://sofdem.github.io/gccat/gccat/Cpeak.html. You are to write a c function
which implements the “valley” constraint and a second c function which
implements the “increasing peak” constraint. You are to update the testbench to
test these new constraints. A constraint is just a form of if statement. The valley
and increasing peak constraints are defined here:
http://sofdem.github.io/gccat/gccat/Cvalley.html
http://sofdem.github.io/gccat/gccat/Cincreasing_peak.html.
The valley constraint is a simple state machine, which is practically identical to
the peak constraint. An implementation of the peak constraint state machine is
given in peak.c. See figure 5.417.3 below for the valley constraint state machine.
The scope of this lab is the design of a hardware accelerator for detecting
anomalies in time series data. These anomalies are defined by the user in terms
of constraints which can be used to detect combinations of spikes and/or troughs
with particular characteristics. Such accelerators could be deployed for example

into a nuclear power facility to quickly detect fluctuations in the sensor readings
from the instrumentation control systems of the plant.
http://www.mcobject.com/radico,
https://www.iaea.org/NuclearPower/IandC/index.html
The different constraints can be combined to form more complex filters. See for
example here
https://www.doulos.com/knowhow/systemc/tutorial/modules_and_processes/
where a systemc model of an EXOR gate is implemented using four NAND gates.
The code (testbench.c and peak.c) is a high level data flow model/design that
can be synthesised directly onto a FPGA using for example vivado HLS.
https://www.xilinx.com/video/hardware/getting-started-vivado-high-levelsynthesis.html

 

    Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

    Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

    Do you need an answer to this or any other questions?

    About Wridemy

    We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

    How It Works

    To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

    Are there Discounts?

    All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

    Hire a tutor today CLICK HERE to make your first order

    Related Tags

    Academic APA Writing College Course Discussion Management English Finance General Graduate History Information Justify Literature MLA