İptal Edildi

Logic Circuit Simulator in C++

The goal is to program a small logic simulator. The program should read in

circuits in the benchmark format (*.bench) and translate them to an internal circuit representation. To test your simulator example inputs to the circuit are provided in separate files

(*.in). The inputs are read in and assigned to the circuit sequentially. After every input vector

the circuit needs to be evaluated and the result should be printed to the console. An example

output format together with simulation results are provided in the *.result files.

The assignment is divided into 3 parts:

a) Write the class Circuit which is able to read in a .bench file and translates the description

into an internal representation of the circuit.

The statements in the benchmark files that you need to identify are:

INPUT(name), OUTPUT(name) : These mark the input and output lines of

the circuit.

name = AND(name1, name2, ... name n) : This is an AND gate with inputs name 1to name

n and the output name

The gates you should implement are: NOT, AND, NAND, OR, NOR, XOR.

Hint: Create another class Node which contains the description of every gate (or in-put/output) and it’s state.

Also, you don’t need to implement every data structure. For common data structures

there are templates in the standard template library (e.g. vector) which you may use.

[url removed, login to view]

b) Write the function setInputs(string inputstring) to set all the inputs in a circuit with

the bits provided in the input string and then simulate the circuit with eval(). The

provided circuits are already sorted topologically, so the evaluation of nodes can be done

in order of appearance in the bench files.

c) Implement the function TopologicalSort() for circuits that are not sorted topologically.

Evaluate your program with the circuits in the folder mixed. These are the same circuits

as before but with their lines beeing swapped randomly

Beceriler: Algoritma

Daha fazlasını görün: logic circuit simulator, bench file circuit simulation, circuit simulator, vector templates, vector template example, vector string, vector stl, vector cplusplus, use data structure programming, use algorithm programming, test algorithm, template stl, template algorithm, string vector, string stl, string library, string data structure, string cplusplus, string algorithm, stl vector example, stl vector, stl templates, stl template, stl string, stl standard template library

İşveren Hakkında:
( 0 değerlendirme ) Islamabad, Pakistan

Proje NO: #4423747

3 freelancer bu iş için ortalamada 237$ teklif veriyor

samitXI

Please check your inbox. Thanks

in 7 gün içinde262$ USD
(3 Değerlendirme)
2.9
hbxfnzwpf

I am very proficient in c, c++. I have 15 years c++ developing experience now, and I have worked for 5 years, please let expert help you.

in 7 gün içinde250$ USD
(0 Değerlendirme)
0.0
Jauhenka

Not too hard. Can do it by monday with comments and explanation.

in 3 gün içinde200$ USD
(0 Değerlendirme)
0.0