yeppolife92
Newbie level 3
parameter RED =3'b000; //if assume as 0 round off ~ 0
parameter YELLOW =3'b001; //if assume as 1.2 round off ~1
parameter GREEN =3'b010; //if assume as 2.1 round off ~ 2
parameter BLUE =3'b011; //if assume as 1.7 round off ~ 2
parameter COKLAT =3'b100; //if assume as 0.2 round off ~ 0
parameter BLACK =3'b101; //if assume as 1.4 round off ~ 1
parameter PURPLE =3'b110; //if assume as 2.4 round off ~ 2
parameter ORANGE =3'b111; //if assume as 0.8 round off ~ 1
i want to make coding which i represent the parameter of 3 bit to a point form integer. after that i want to make a condition if the assume is given then it will trigger to the round off number...
exmple : if i want 3 bit (001) which i assume to be 1.2 will be 1 as output....???plz help me with this coding....??:-(
parameter YELLOW =3'b001; //if assume as 1.2 round off ~1
parameter GREEN =3'b010; //if assume as 2.1 round off ~ 2
parameter BLUE =3'b011; //if assume as 1.7 round off ~ 2
parameter COKLAT =3'b100; //if assume as 0.2 round off ~ 0
parameter BLACK =3'b101; //if assume as 1.4 round off ~ 1
parameter PURPLE =3'b110; //if assume as 2.4 round off ~ 2
parameter ORANGE =3'b111; //if assume as 0.8 round off ~ 1
i want to make coding which i represent the parameter of 3 bit to a point form integer. after that i want to make a condition if the assume is given then it will trigger to the round off number...
exmple : if i want 3 bit (001) which i assume to be 1.2 will be 1 as output....???plz help me with this coding....??:-(