sc_fxval.cc (12854:c95c35407325) | sc_fxval.cc (13322:7391057615bd) |
---|---|
1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at --- 37 unchanged lines hidden (view full) --- 46// 47 48#include <cctype> 49#include <cfloat> 50#include <cmath> 51#include <cstdlib> 52 53#include "systemc/ext/dt/fx/sc_fxval.hh" | 1/***************************************************************************** 2 3 Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 4 more contributor license agreements. See the NOTICE file distributed 5 with this work for additional information regarding copyright ownership. 6 Accellera licenses this file to you under the Apache License, Version 2.0 7 (the "License"); you may not use this file except in compliance with the 8 License. You may obtain a copy of the License at --- 37 unchanged lines hidden (view full) --- 46// 47 48#include <cctype> 49#include <cfloat> 50#include <cmath> 51#include <cstdlib> 52 53#include "systemc/ext/dt/fx/sc_fxval.hh" |
54#include "systemc/ext/utils/messages.hh" |
|
54 55namespace sc_dt 56{ 57 58// ---------------------------------------------------------------------------- 59// CLASS : sc_fxval 60// 61// Fixed-point value type; arbitrary precision. --- 316 unchanged lines hidden (view full) --- 378 case SC_OCT_US: 379 step = 3; 380 break; 381 case SC_HEX: 382 case SC_HEX_US: 383 step = 4; 384 break; 385 default: | 55 56namespace sc_dt 57{ 58 59// ---------------------------------------------------------------------------- 60// CLASS : sc_fxval 61// 62// Fixed-point value type; arbitrary precision. --- 316 unchanged lines hidden (view full) --- 379 case SC_OCT_US: 380 step = 3; 381 break; 382 case SC_HEX: 383 case SC_HEX_US: 384 step = 4; 385 break; 386 default: |
386 SC_REPORT_FATAL("assertion failed", "unexpected sc_numrep"); | 387 SC_REPORT_FATAL(sc_core::SC_ID_ASSERTION_FAILED_, 388 "unexpected sc_numrep"); |
387 sc_core::sc_abort(); 388 } 389 390 msb = (int)std::ceil(double(msb + 1) / step) * step - 1; 391 392 lsb = (int)std::floor(double(lsb) / step) * step; 393 394 if (msb < 0) { --- 416 unchanged lines hidden --- | 389 sc_core::sc_abort(); 390 } 391 392 msb = (int)std::ceil(double(msb + 1) / step) * step - 1; 393 394 lsb = (int)std::floor(double(lsb) / step) * step; 395 396 if (msb < 0) { --- 416 unchanged lines hidden --- |