Hello there,
Am trying to implement binary to gray converter using simple case statements. When I try to execute, only the first statement of the switch case is being executed.
Here's my gtb.cpp and driver module
// driver.cpp
#include "driver.h"
void driver::proc_driver()
{
while(1)
{
d_bin = 0;
wait(5, SC_NS);
d_bin = 4;
wait(5, SC_NS);
}
}
#include"gtb.h"
void gtb::proc_graytobinary() {
switch(bin.read())
{
case 0 : grayout = 0; break;
case 1 : grayout = 1; break;
default: grayout = 2; break;
}
}
Please help me solve this issue.
Thanks in advance