0% found this document useful (0 votes)
5 views33 pages

Python MP3 Music Player Project Report

The project report outlines the development of a Python-based MP3 music player, detailing its design, implementation, and user training processes. It includes sections on system analysis, feasibility studies, and maintenance, emphasizing the importance of user support and proper documentation. The report is submitted to the H.P Takniki Shiksha Board by Devang Thakur under the supervision of Pawan Kumar Gaur.

Uploaded by

mohit250806
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views33 pages

Python MP3 Music Player Project Report

The project report outlines the development of a Python-based MP3 music player, detailing its design, implementation, and user training processes. It includes sections on system analysis, feasibility studies, and maintenance, emphasizing the importance of user support and proper documentation. The report is submitted to the H.P Takniki Shiksha Board by Devang Thakur under the supervision of Pawan Kumar Gaur.

Uploaded by

mohit250806
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Project Report

ON
MUSIC PLAYER
(DEPARTMENT OF COMPUTER ENGINEERING)

To

H.P TAKNIKI SHIKSHA BOARD, DHARAMSHALA

Submitted by

Name :-Devang Thakur (Roll Number: 2308142)

Under the Supervision of

PAWAN KUMAR GAUR

Department of Computer Engineering


GOVT. POLYTECHNIC PAONTA SAHIB AT DHAULA KUAN DISTT
SIRMOUR, H.P 173031, INDIA
ACKNOWLEDGEMENT

Acknowledgement is an endless ocean and one requires the satisfying,


Supporting,guiding,inspiring and constructively criticizing several specialists in order to drive
out a handful pearls from its [Link] this comes wordlessly it can’t be acknowledged in
words.I am greatly obliged to NOVEM CONTROLS [Link] for providing me this
opportunity to take up this project as long as platform to learn and enhance my professional
skill. I would like to express my deep sense of gratitude to [Link] mam ,my corporate
guide ,for her kind help and support and valuable guidance throughout the project .I am
thankful to her for providing me with necessary insights and helping me out atevery single
step .

Name: Devang Thakur


Roll no: (230814204013)

[Link] Name Page no.

1 Introduction

2 Company Overview

3 Existing System

4 System Development Process


4.1 System analyses
4.2 Feasibility study
4.3 Design
2
4.4 Code Details
4.5 Implementation of project
4.6 Training/User Training
4.7 Operational Document
4.8 System Maintanance

5 Software Environment

6 Screen Shots

7 Conclusion

8 Scope For Future Enhancement

9 Bibliography

3
Introduction

Everybody loves listening music wouldn’t it be cool to have our very own mp3 music player.
So, in this python project, we are going to create an mp3 player with the help of python and
its libraries. Let’s start the python mp3 player project.

Python MP3 Music Player

We will create an mp3 music player in which we can play the song, pause it, resume it, and
navigate from the current song to the next song as well as previous songs.

We will be using Python and its libraries. The first library that we will be using is Tkinter
which is a widely used GUI library offered by python, we do not have to install it separately,
as it comes with python itself.

Next, we will be using the mixer module of a very famous python library called Pygame.

Pygame is basically used to create video games, it includes computer graphics and sound
libraries. Mixer is one such sound library. Then, we will use the os library of python to
interact with the Operating system.

Project Prerequisites

To work on python mp3 player basic understanding of python programming language,


tkinter, and mixer module of pygame would be helpful.

A basic understanding of Tkinter widgets would also be required, but don’t worry as we will
be explaining every line of code as we go developing this mp3 player project.

Unlike the Tkinter library, we are required to install the Pygame library.

pygame is a Free and Open Source python programming language library for making
multimedia applications like games built on top of the excellent SDL (Simple DirectMedia
Layer) library. Simple DirectMedia Layer is a cross-platform development library designed
to provide low-level access to audio, keyboard, mouse, joystick, and graphics hardware via
OpenGL and Direct3D. Like SDL, pygame is highly portable and runs on nearly every
platform and operating system. Millions of people have downloaded pygame itself, which is a
whole lot of bits flying across the interwebs.

[Link] (the website) welcomes all Python game, art, music, sound, video and
multimedia projects.

Pygame requires Python. The best way to install pygame is with the pip tool (which is what
python uses to install packages). Note, this comes with python in recent versions. We use the
user flag to tell it to install into the home directory, rather than globally.

4
5
6
Existing system

Steps on how to create music system In Python Code

Tetris In Python Code

Step 1: Create a project name.


First open Pycharm IDE and then create a “project name” after creating a project name
click the “create” button.

Tetris In Python Code Project Name

Step 2: Create a python file.


Second after creating a project name, “right click” your project name and then click “new”
after that click the “python file“.

Tetris In Python Code Python File

Step 3: Name your python file.


Third after creating a python file, Name your python file after that click “enter“.

Tetris In Python Code Python File Name

Step 4: The Actual Code.


You are free to copy the code given below and download the full source code below.

7
Hardware requirements

SOFTWARE REQUIREMENTS

 Python
 Idle 3.9
 Chrome

8
4. System Development Process

4.1. SYSTEM ANALYSIS


4.2.
System analysis is a process of gathering and interpreting facts, diagnosing problems and
the information to recommend improvements on the system. It is a problem solving activity
that requires intensive communication between the system users and system developers.
System analysis or study is an important phase of any system development process. The
system is studied to the minutest detail and analyzed. The system analyst plays the role of
the interrogator and dwells deep into the working of the present system. The system is
viewed as a whole and the input to the system are identified. The outputs from the
organizations are traced to the various processes. System analysis is concerned with
becoming aware of the problem, identifying the relevant and decisional variables,
analyzing and synthesizing the various factors and determining an optimal or at least a
satisfactory solution or program of action.
A detailed study of the process must be made by various techniques like interviews,
questionnaires etc. The data collected by these sources must be scrutinized to arrive to a
conclusion. The conclusion is an understanding of how the system functions. This system is
called the existing system. Now the existing system is subjected to close study and problem
areas are identified. The designer now functions as a problem solver and tries to sort out the
difficulties that the enterprise faces. The solutions are given as proposals. The proposal is
then weighed with the existing system analytically and the best one is selected. The
proposal is presented to the user for an endorsement by the user. The proposal is reviewed
on user request and suitable changes are made. This is loop that ends as soon as the user is
satisfied with proposal.
Preliminary study is the process of gathering and interpreting facts, using the information
for further studies on the system. Preliminary study is problem solving activity that
requires intensive communication between the system users and system developers. It does
various feasibility studies. In these studies a rough figure of the system activities can be
obtained, from which the decision about the strategies to be followed for effective system
study and analysis can be taken.
Here in the Email to Fax server project, a detailed study of existing system is carried along
with all the steps in system analysis. An idea for creating a better project was carried and
the next steps were followed.

9
4.3. FEASIBILITY STUDY

Feasibility study is made to see if the project on completion will serve the purpose of the
organization for the amount of work, effort and the time that spend on it. Feasibility study
lets the developer foresee the future of the project and the usefulness. A feasibility study of
a system proposal is according to its workability, which is the impact on the
organization, ability to meet their user needs and effective use of resources. Thus when a
new application is proposed it normally goes through a feasibility study before it is
approved for development.

The document provide the feasibility of the project that is being designed and lists various
areas that were considered very carefully during the feasibility study of this project such as
Technical, Economic and Operational feasibilities.

The following are its features:

TECHNICAL FEASIBILITY

The system must be evaluated from the technical point of view first. The assessment of this
feasibility must be based on an outline design of the system requirement in the terms of
input, output, programs and procedures. Having identified an outline system, the
investigation must go on to suggest the type of equipment, required method developing the
system, of running the system once it has been designed.

Technical issues raised during the investigation are:

 Does the existing technology sufficient for the suggested one?


 Can the system expand if developed?

The project should be developed such that the necessary functions and performance
are achieved within the constraints. The project is developed within latest technology.
Through the technology may become obsolete after some period of time, due to the fact
that never version of same software supports older versions, the system may still be used.
So there are minimal constraints involved with this project. The system has been developed
using Java the project is technically feasible for development.
10
ECONOMIC FEASIBILITY

The developing system must be justified by cost and benefit. Criteria to ensure that effort is
concentrated on project, which will give best, return at the earliest. One of the factors,
which affect the development of a new system, is the cost it would require.

The following are some of the important financial questions asked during preliminary
investigation:

 The costs conduct a full system investigation.


 The cost of the hardware and software.
 The benefits in the form of reduced costs or fewer costly errors.

Since the system is developed as part of project work, there is no manual cost to spend
for the proposed system. Also all the resources are already available, it give an indication
of the system is economically possible for development.

BEHAVIORAL FEASIBILITY

This includes the following questions:

 Is there sufficient support for the users?


 Will the proposed system cause harm?

The project would be beneficial because it satisfies the objectives when developed and
installed. All behavioral aspects are considered carefully and conclude that the project is
behaviorally feasible.

4.4. CODE DETAILS


The purpose of code is to facilitate the identification, retrieval of the items and
information. A code is an oriented collection of symbols design to provide unique
identification of an entry or attribute. Code is built with manually exclusive features. Codes
in all cases specify object which are physical or on performance characteristics. They are
used to give optimal distraction and other information. Codes are used for identifying,
accessing, storing and matching records. The codes insure that only one value of the code
with a single meaning is correctly applied to give entity or attribute as described in various
ways. Code can also be design in a manner easily understood and applied by the user.

11
Coding Standard
The standard used in the development of the system is Microsoft Programming standards.
It includes naming conversions of variables, constants and objects, standardized formats or
labelling and commenting code, spacing, formatting and indenting.

Naming Convention
Classes’ names and interface names will start with capital letter. The function names will
start with small letters and the first letter of each word in the function name will be in capital
letter.

Labels and Comments


Sufficient labels and comments are included in the description of it for the benefits if the
developer and other programmers who might examine it later.

User Interface

 For all the entry screen frames are used which will show the type of the user who is
currently logged in and the menus.

 Standard actions are used for standard actions.

 Same font is related properties are used for similar screens.

The method of implementation and the time scale to be adopted are found out initially.
Next the system is tested properly and the users are trained in the new procedures.

4.5. IMPLEMENTATION OF PROJECT

Implementation is the stage of the project where the theoretical design is turned into a
working system. It can be considered to be the most crucial stage in achieving a successful
new system gaining the users confidence that the new system will work and will be
effective and accurate. It is primarily concerned with user training and documentation.
Conversion usually takes place about the same time the user is being trained or later.
Implementation simply means convening a new system design into operation, which is the
process of converting a new revised system design into an operational one.

12
Implementation is the stage of the project where the theoretical design is tuned into a
working system. At this stage the main work load, the greatest upheaval and the major
impact on the existing system shifts to the user department. If the implementation is not
carefully planned and controlled it can create chaos and confusion.

Implementation includes all those activities that take place to convert from the existing
system to the new system. The new system may be a totally new, replacing an existing
manual or automated system or it may be a modification to an existing system. Proper
implementation is essential to provide a reliable system to meet organization requirements.
The process of putting the developed system in actual use is called system implementation.
This includes all those activities that take place to convert from the old system to the new
system. The system can be implemented only after through testing is done and if it is found
to be working according to the specifications. The system personnel check the feasibility of
the system. The more complex the system being implemented, the more involved will be
the system analysis and design effort required to implement the three main aspects:
education and training, system testing and changeover.

The implementation state involves the following tasks:

 Careful planning.
 Investigation of system and constraints.
 Design of methods to achieve the changeover.
 Training of the staff in the changeover phase.

Implementation Procedures

Implementation of software refers to the final installation of the package in its real
environment, to the satisfaction of the intended uses and the operation of the system. In
many organizations someone who will not be operating it, will commission the software
development project. In the initial stage people doubt about the software but we have to
ensure that the resistance does not build up, as one has to make sure that

 The active user must be aware of the benefits of using the new system.
 Their confidence in the software is built up.
 Proper guidance is imparted to the user so that he is comfortable in
using the application.

13
Before going ahead and viewing the system, the user must know that for viewing the result,
the server program should be running in the server. If the server object is not up running on
the server, the actual process won’t take place.

4.6. TRANING/USER TRAINING

User training is designed to prepare the user for testing and converting the system. To
achieve the objective and benefits expected from computer based system, it is essential for
the people who will be involved to be confident of their role in the new system. As system
becomes more complex, the need for training is more important. By user training the user
comes to know how to enter data, respond to error messages, interrogate the database and
call up routine that will produce reports and perform other necessary functions.

Training on the Application Software

After providing the necessary basic training on computer awareness the user will have to be
trained on the new application software. This will give the underlying philosophy of the
use of the new system such as the screen flow, screen design type of help on the screen,
type of errors while entering the data, the corresponding validation check at each entry and
the ways to correct the date entered. It should then cover information needed by the
specific user/ group to use the system or part of the system while imparting the training of
the program on the application. This training may be different across different user groups
and across different levels of hierarchy.

4.7. Operational Document

Once the implementation plan is decided, it is essential that the user of the system is made
familiar and comfortable with the environment. Education involves right atmosphere and
motivating the user. A documentation providing the whole operations of the system is
being developed in such a way that the user can work with it in well consistent way. The
system is developed user friendly so that the user can work the system from the tips given
in the application itself. Useful tip and guidance is given inside the application itself to help
the user. Users have to be made aware that what can be achieved with the new system and
how it increases the performance of the system. The user of the system should be given a
general idea of the system before he uses the system.

14
4.8. System Maintenance

Maintenance is the enigma of system development. The maintenance phase of the software
cycle is the time in which a software product performs useful work. After a system is
successfully implemented, it should be maintained in a proper manner. System
maintenance is an important aspect in the software development life [Link] need for
system maintenance is for it to make adaptable to the changes in the system environment.
Software maintenance is of course, far more than "FindingMistakes". Maintenance may be
defined by describing four activities that are undertaken after a program is released for use.

15
DATABASE DESIGN

A database is an organized mechanism that has the capability of storing information


through which a user can retrieve stored information in an effective and efficient manner.
The data is the purpose of any database and must be protected.

The database design is a two level process. In the first step, user requirements are gathered
together and a database is designed which will meet these requirements as clearly as
possible. This step is called Information Level Design and it is taken independent of any
individual DBMS.

In the second step, this Information level design is transferred into a design for the specific
DBMS that will be used to implement the system in question. This step is called Physical
Level Design, concerned with the characteristics of the specific DBMS that will be used. A
database design runs parallel with the system design. The organization of the data in the
database is aimed to achieve the following two major objectives:

o Data Integrity
o Data independence

Normalization is the process of decomposing the attributes in an application, which results


in a set of tables with very simple structure. The purpose of normalization is to make tables
as simple as possible. Normalization is carried out in this system for the following reasons.

 To structure the data so that there is no repetition of data, this helps insaving.

 To permit simple retrieval of data in response to query and report request.

 To simplify the maintenance of the data through updates, insertions, deletions.

 To reduce the need to restructure or reorganize data which new


application Requirements arise.

RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)

A relational model represents the database as a collection of relations. Each relation


resembles a table of values or file of records. In formal relational model terminology, a row
is called a tuple, a column header is called an attribute and the table is called a relation. A
relational database consists of a collection of tables, each of which is assigned a unique
name. A row in a tale represents a set of related values.
16
RELATIONS, DOMAINS & ATTRIBUTES:

A table is a relation. The rows in a table are called tuples. A tuple is an ordered set of n
elements. Columns are referred to as attributes. Relationships have been set between every
table in the database. This ensures both Referential and Entity Relationship Integrity. A
domain D is a set of atomic values. A common method of specifying a domain is to specify
a data type from which the data values forming the domain are drawn. It is also useful to
specify a name for the domain to help in interpreting its values. Every value in a relation is
atomic, that is not decomposable.

RELATIONSHIPS:
o Table relationships are established using Key. The two main keys of prime
importance are Primary Key & Foreign Key
o Entity Integrity enforces that no Primary Key can have null values.
o Referential Integrity enforces that no Primary Key can have null values.
o Referential Integrity for each distinct Foreign Key value, there must exist a
matching Primary Key value in the same domain. Other key are Super Key and
Candidate Keys.
o Relationships have been set between every table in the database.
NORMALIZATION:

As the name implies, it denoted putting things in the normal form. The application
developer via normalization tries to achieve a sensible organization of data into proper
tables and columns and where names can be easily correlated to the data by the user.
Normalization eliminates repeating groups at data and thereby avoids data redundancy
which proves to be a great burden on the computer resources. These includes:
 Normalize the data.
 Choose proper names for the tables and columns.
 Choose the proper name for the data.

First Normal Form:

The First Normal Form states that the domain of an attribute must include only atomic
values and that the value of any attribute in a tuple must be a single value from the domain
of that attribute. In other words 1NF disallows “relations within relations” or “relations as
attribute values within tuples”. The only attribute values permitted by 1NF are single
atomic or indivisible values.
17
The first step is to put the data into First Normal Form. This can be donor by moving data
into separate tables where the data is of similar type in each table. Each table is given a
Primary Key or Foreign Key as per requirement of the project. In this we form new
relations for each nonatomic attribute or nested relation. This eliminated repeating groups
of data.

A relation is said to be in first normal form if only if it satisfies the constraints that contain
the primary key only.

Second Normal Form:

According to Second Normal Form, for relations where primary key contains multiple
attributes, no nonkey attribute should be functionally dependent on a part of the primary
key.

In this we decompose and setup a new relation for each partial key with its dependent
attributes. Make sure to keep a relation with the original primary key and any attributes
that are fully functionally dependent on it. This step helps in taking out data that is only
dependant on apart of the key.

A relation is said to be in second normal form if and only if it satisfies all the first normal
form conditions for the primary key and every non-primary key attributes of the relation is
fully dependent on its primary key alone.

Third Normal Form:

According to Third Normal Form, Relation should not have a nonkey attribute
functionally determined by another nonkey attribute or by a set of nonkey attributes. That
is, there should be no transitive dependency on the primary key.

In this we decompose and set up relation that includes the nonkey attributes that
functionally determines other nonkey attributes. This step is taken to get rid of anything
that does not depend entirely on the Primary Key.

A relation is said to be in third normal form if only if it is in second normal form and more
over the non key attributes of the relation should not be depend on other non key attribute.

18
Testing

Testing is the process of exercising software with the intent of finding errors and ultimately
correcting them. The following testing techniques have been used to make this project free
of errors. Content Review The whole content of the project has been reviewed thoroughly
to uncover typographical errors, grammatical error and ambiguous sentences. Navigation
Errors Different users were allowed to navigate through the project to uncover the
navigation errors. The views of the user regarding the navigation flexibility and user
friendliness were taken into account and implemented in the project. Unit Testing Focuses
on individual software units, groups of related units. Unit – smallest testable piece of
software. A unit can be compiled /assembled / linked/loaded; and put under a test harness.
Unit testing done to show that the unit does not satisfy the application and /or its
implemented software does not match the intended designed structure. Integration Testing
Focuses on combining units to evaluate the interaction among them.

19
Python

What is Python?

Python is a popular programming language. It was created by Guido van Rossum, and
released in 1991.

It is used for:

 Web development (server-side),


 Software development,
 Mathematics,
 System scripting.

What can Python do?

 Python can be used on a server to create web applications.


 Python can be used alongside software to create workflows.
 Python can connect to database systems. It can also read and modify files.
 Python can be used to handle big data and perform complex mathematics.
 Python can be used for rapid prototyping, or for production-ready software
development.

Why Python?

 Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
 Python has a simple syntax similar to the English language.
 Python has syntax that allows developers to write programs with fewer lines
than some other programming languages.
 Python runs on an interpreter system, meaning that code can be executed as
soon as it is written. This means that prototyping can be very quick.
 Python can be treated in a procedural way, an object-orientated way or a functional
way.

20
Good to know

 The most recent major version of Python is Python 3, which we shall be using in
this tutorial. However, Python 2, although not being updated with anything other
than security updates, is still quite popular.
 In this tutorial Python will be written in a text editor. It is possible to write
Python in an Integrated Development Environment, such as Thonny, Pycharm,
Netbeans or Eclipse which are particularly useful when managing larger
collections of Python files.

Python Syntax compared to other programming languages

 Python was designed for readability, and has some similarities to the English
language with influence from mathematics.
 Python uses new lines to complete a command, as opposed to other
programming languages which often use semicolons or parentheses.
 Python relies on indentation, using whitespace, to define scope; such as the scope
of loops, functions and classes. Other programming languages often use curly-
brackets for this purpose.

Python Install

Many PCs and Macs will have python already installed.

To check if you have python installed on a Windows PC, search in the start bar for
Python or run the following on the Command Line ([Link]):

C:\Users\Your Name>python --version

To check if you have python installed on a Linux or Mac, then on linux open the command
line or on Mac open the Terminal and type:

python --version

If you find that you do not have python installed on your computer, then you can
download it for free from the following website: [Link]

21
Python Quickstart

Python is an interpreted programming language, this means that as a developer you write
Python (.py) files in a text editor and then put those files into the python interpreter to be
executed.

The way to run a python file is like this on the command line:

C:\Users\Your Name>python [Link]

Where "[Link]" is the name of your python file.

Let's write our first Python file, called [Link], which can be done in any text editor.

[Link]

print ("Hello, World!")

Run example »

Simple as that. Save your file. Open your command line, navigate to the directory where
you saved your file, and run:

C:\Users\Your Name>python [Link]

The output should read:

Hello, World!

Congratulations, you have written and executed your first Python program.

22
Python Syntax

Execute Python Syntax

As we learned in the previous page, Python syntax can be executed by writing directly in the
Command Line:

>>>print("Hello, World!")
Hello, World!

Or by creating a python file on the server, using the .py file extension, and running it
in the Command Line:

C:\Users\Your Name>python [Link]

Python Indentations

Where in other programming languages the indentation in code is for readability only, in
Python the indentation is very important.

Python uses indentation to indicate a block of code.

Example

if 5 > 2:
print("Five is greater than two!")

Run example »

Python will give you an error if you skip the indentation:

23
Example

if 5 > 2:
print("Five is greater than two!")

Run example »

Comments

Python has commenting capability for the purpose of in-code documentation.

Comments start with a #, and Python will render the rest of the line as a comment:

Example

Comments in Python:

#This is a comment.
print("Hello, World!")

Run example »

Docstrings

Python also has extended documentation capability, called docstrings. Docstrings can be

one line, or multiline.

Python uses triple quotes at the beginning and end of the docstring:

Example

Docstrings are also comments:

24
"""This is a
Run example »

multiline docstring.""" print("Hello,


World!"

25
Python Variables
Creating Variables

Unlike other programming languages, Python has no command for declaring a variable.

A variable is created the moment you first assign a value to it.

Example

x=5
y = "John"
print(x) print(y)

Run example »

Variables do not need to be declared with any particular type and can even change type after
they have been set.

Example

x = 4 # x is of type int
x = "Sally" # x is now of type str print(x)

Run example »

Variable Names

A variable can have a short name (like x and y) or a more descriptive name (age,
carname, total_volume). Rules for Python variables:

 A variable name must start with a letter or the underscore character


 A variable name cannot start with a number

26
 A variable name can only contain alpha-numeric characters and
underscores (A-z, 0-9, and _ )
 Variable names are case-sensitive (age, Age and AGE are three different variables)

Remember that variables are case-sensitive

Output Variables

The Python print statement is often used to output variables.

To combine both text and a variable, Python uses the + character:

Example

x = "awesome"
print("Python is " + x)

Run example »

You can also use the + character to add a variable to another variable:

Example

x = "Python is "
y = "awesome"
z = x + y
print(z)

Run example »

For numbers, the + character works as a mathematical operator:

27
Example

x=5
y = 10
print(x + y)

Run example »

If you try to combine a string and a number, Python will give you an error:

Example

x=5
y = "John"
print(x + y)

Run example »

28
Python – Loops

In general, statements are executed sequentially: The first statement in a function is


executed first, followed by the second, and so on. There may be a situation when you need
to execute a block of code several number of times.

Programming languages provide various control structures that allow for more
complicated execution paths.

A loop statement allows us to execute a statement or group of statements multiple times.


The following diagram illustrates a loop statement −

Python programming language provides following types of loops to handle looping


requirements.

[Link]. Loop Type & Description

1 while loop

Repeats a statement or group of statements while a given condition is TRUE. It


tests the

29
condition before executing the loop body.

2 for loop

Executes a sequence of statements multiple times and abbreviates the code that
manages the loop variable.

3 nested loops

You can use one or more loop inside any another while, for or do..while loop.

Loop Control Statements


Loop control statements change execution from its normal sequence. When execution
leaves a scope, all automatic objects that were created in that scope are destroyed.

Python supports the following control statements. Click the following links to check their

detail. Let us go through the loop control statements briefly

[Link]. Control Statement &


Description

1 break statement

Terminates the loop statement and transfers execution to the statement


immediately following the loop.

2 continue statement

Causes the loop to skip the remainder of its body and immediately retest its
condition prior to reiterating.

3 pass statement

The pass statement in Python is used when a statement is required syntactically


but you do not want any command or code to execute.

30
SCREENSHOT

31
Conclusion

Conclusions while trying to initalize the BRAMs in the hardware design it was discovered
that MicroBlaze addressing is byte oriented while we wanted to write complete 32bit
words. So when incrementing a pointer it adds 4 to the address. This means that the 2 least
significant bits from the BRAM controller to the hardware memories should be thrown
away. The initialization data, bitmap and palette data, that is loaded on to hardware in the
initialization phase of the software occupies twice the BRAM on the FPGA as needed. The
RAM is allocated by the graphics accelerator and then it’s programmed into the
MicroBlaze BRAM on programming. This would of course have been better to store in
non-volatile memory. Since it is only loaded once and has no speed requirements. The
main part of the MicroBlaze BRAM is occupied by .text i.e. the instructions, about 30kB.
Since MicroBlaze is configured with 32 kB this means that almost all the BRAM is
occupied with instructions. It would ofcourse be better to store in an larger external
memory accessing using an instruction cache. This would have made it possible to place
heap and stack in BRAM instead of placing it on the slow PSRAM. Which would have
been a much neater design. A lot of problems encountered were probably misjudged and it
might not even been errors. This due to to poor testing. For exmaple ill thought testing
data generating an output thought to be wrong. When it might have been right. The lesson
we learned is to construct well defined tests, where the expected output is known. One of
this incidents is described below: The hardware was designed with AXI bus, and therefore
a new IP core provided by digilent to interface the external memories was used, called
Digilent mem bus mux. But this core has no documentation what so ever. For example it
outputs a 17 bit databus. The bugs this introduced was probaby software related since we
now using it with correct behavior. But we still miss some documentation describing this
ip core. Similar problem occured when first testing the hardware with some "random"
input data to the background memory.

32
Bibliography

BOOKS:

 Press
 Ian Somerville ‘Software engineering’
 Rajeev mall ‘Software engineering’
 ElmasriNavathe ‘Fundamentals of database systems’

33

You might also like