Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by ronyz

  1. Hi, It seems that the constraint solver has as issue with negative values. I tried this example: struct addr_constraint : public scv_constraint_base { scv_smart_ptr<sc_int<8>> row; scv_smart_ptr<sc_int<8>> col; SCV_CONSTRAINT_CTOR(addr_constraint) { SCV_CONSTRAINT ( (col() + row() == 10) } In this case I only got positive values for col and row. I tried playing with the constraint and tried the following: SCV_CONSTRAINT ( (col() + row() == 10) || (col() - (0 - row()) == 10) ); This constraint is identical to the previous one but now I get both negative and positive values for col and row. Anyone else had this issue? Why does it happen? Thanks!
  2. Hi, I have two problems: 1) I tried to implement multiplication constraint based on the one of the examples: struct addr_constraint : public scv_constraint_base { scv_smart_ptr<int> row; scv_smart_ptr<int> col; SCV_CONSTRAINT_CTOR(addr_constraint) { SCV_CONSTRAINT( (row())*(col()) < 50); SCV_CONSTRAINT( col() > 0); } }; When I try to randomize the values, the program keeps running and never stops. What might be the problem? 2) Is there any way to define more complex mathematical constraints? constraints on the square, log, shift, division etc...? Where can I find a list of the supported mathematical operations? Thanks!
  • Create New...