İ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: logic circuit simulator, bench file circuit simulation, CIRCUIT SIMULATOR, class circuit able read bench file, assignment, vector vector string, vector templates, vector template example, vector string, vector stl, vector library, vector in c, vector cplusplus, use of data structure in programming, use of algorithm in programming, the standard template library, test algorithm, template stl, template library, template in c

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

Proje NO: #4423747

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


Please check your inbox. Thanks

in %bids___i_period_sub_35% gün içinde262%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(3 Değerlendirme)

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 %bids___i_period_sub_35% gün içinde250%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)

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

in %bids___i_period_sub_35% gün içinde200%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(0 Değerlendirme)