Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/05/2012 in all areas

  1. Yes, synthesis of C++ data types (like the SystemC ones) is hard and comes with a lot of corner cases. Although I don't know CAPH, two comments: You mention a "type inference phase". The rules for (integer) arithmetics are quite complex in C (and thus in C++). Make sure, that you get the integer promotion rules and the (un)signedness correct. This is quite hard to debug. Hopefully, a good C++ frontend handles most of the work for you here. Inserting the "correct" cast will be very difficult as well. You should rely on the unary operator '+' in this particular case instead: When you detect an expression in one of the operands, make the other one an expression as well by prepending a '+'. This should work for all reasonable arithmetic types and allows you to rely on the C++ rules. Moreover, it will be more efficient (during post-synthesis simulation). Greetings from Oldenburg, Philipp
    1 point
×
×
  • Create New...