In this lecture, we are going to synthesize the home alarm system for the basis to report and examine
the system, practically notice that the project source files are attached to this lecture under the
resources folder.
Firstly, creative, you are the Atlas project with the name of home underscore Alah, underscore system,
Batsheva Atlas.
Don't forget to choose the basis to report as a target FPGA platform.
Now create new design and has been source on Weatherford's.
Open the design, Heather Fry, then include the AP, underscore that each fight and declare an artery
that keeps all the Southern segment codes from F to zero.
Now open the design source file and then start developing the design top function.
Define a function with two inputs and outputs as shown here, then add the port interfaces.
In the function body, get this light switches argument, which has the main system inputs and it split
the sensor data and the system code into separate variables.
Here I have defined the show, underscore false variable to save the push-Button status.
Send all the light, which is a status to LCD on the board now check if the system is on or off.
If it's off, then sure, the letter O on olsun segments.
Otherwise, check the sensors if there isn't any problem, showed the letter A on all seven segments
otherwise called a security breach function for more inspection.
Let's describe the security breach, top function.
For this purpose, create a new source file under the source folder with the name of security underscore
bridge that CPB.
As there is a problem in the system, the function sends the letter E to all seven segments, then it
checks the push buttons via show underscore false variable.
Then according to the census, it calls the proper function to display information on the seven segments.
The display underscore window function shows the window number on the first seven segment, if the corresponding
push button has been pressed, the display underscore motion function does the same for motion sensors.
Don't forget to add security breach function Prototyp to the design hydrofoil.
Now go to the test bench hydrofoil and other designed top function prototype.
And it has been a source file and start developing their main function, firstly, define the status
variable and report that properly.
Then define a couple of variables to be used later in the code, then we should generate the test inputs
for this purpose, usefulness the loops each corresponds to a design input, then prepare the design
function arguments and call the design and the koan and software implementation and report any discrepancy.
The only thing that has been remained is the software implementation for this purpose, check the code
in the source files attached to this lecture.
Now we are ready for the simulation, run that and check the reports.
After performing the simulation successfully run the synthesis process, the report should confirm that
the result of the hardware is fully combination.
Ron Artest article simulation and make sure that the general generated article hardware behaves as expected.
Generally, the article ipe and be ready for the logic syntheses step.
Create a new Rebadow project considering the basis report as a target FPGA.
Then create a blog design before using the generated article IP, we should add that to the vision of
the repository.
So right somewhere inside the diagram tab and select the IP settings option, then go to the repository
option under the IP on the left, then press the button and browse without the actual misfold Devadas,
such as for any possible IP and adds that to the repository.
Now, add our home alarm system, I.P. into the diagram area and make all the ports external change
report names if you want.
Now, we should define the physical constraints for the ports, as usual, define a new constraint while.
And use the comment of constraints provided by the basis three board vendor.
And uncommon, the required constrains and modified the report names, alternatively, you can simply
copy and paste the constraints provided in the source files attached to this lecture.
Now, debate history, don't forget to generate outward products and create a steel wrapper before that.
Now we can program the board and examine the system.
The Dunolly illuminates, which indicates the board has been configured as the system is off, the seven
segments showed the lateral to turn on the system.
We should insert the one zero one one pattern using the last four as light switches.
Now, as there is no problem in the House that some segments show the letter A.
Now, let's open the first window while the system is active for this purpose, we can change the state
of the first light switch.
Now, some segments show the letter to indicate the open window we can use to push buttons.
Now, let's activate the motion sensor for this purpose.
We can change the state of S.W. seven that models the second motion sensor pressing the center push
button reveals the sensor number that has detected a motion.