Jump to content

JorgeAbarca

Members
  • Content Count

    7
  • Joined

  • Last visited

About JorgeAbarca

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Could you please elaborate more on your suggestion? i can find out the voltage of every power domain, and each port knows the domain where it belongs... but how can I see where the signal comes from ??? I mean, if the ModA has a signal conected to ModB.... how modB can realize that the signal comes from modA?
  2. i am not sure if what i am asking is very basic, probably yes, but to solve this i have had to learn while deliver. does my analysis make sense ?
  3. if I think i terms of software and not in Hardware, what I would need is an sc_signal with 1 more attribute. then to do that i can create a new class that inherits from sc_signal, include the attribute (float DomainVoltage) and include a setter and getter. And in my opinion that sounds like a solution, but now i dont know how to read it into my ports. in geneal words i have something like this: //sc_signal_upf CLASS class sc_signal_upf : public sc_signal<T,POL> { float DomainVoltage; public: sc_signal_upf(){} void operator = ( const T& a ){ (*this).write(a); } float getDomainVoltage(){ return DomainVoltage; } }; //port with UPF emplate<typename T> class sc_out_upf : public sc_channel { how can i access the gette rhere ??????? }
  4. Hi, I am working on a code that gives support to some UPF features. Right now, i am working on the solution to support Level Shifters. Basically my project reads the UPF file, and extracts the relevant information, each port knows to which PowerDomain belongs and the status of it, then they are able to react depends on if the power domain is ON or OFF. Now i am trying to solve how to include the level shifter support, what i have thought is to generate a customized channel, based on sc_signal, but instead of write(_value), write(_value, _domainvoltage). the idea is that the implementation is hidden to the final user (since each port knows the UPF info, it will knows the voltage of the domain). in that way, when a value is read, i will be able to known the domain voltage, and then make some decisions based on that value. What do you think? my strategy would work? i am still working on the code to do that. thanks -
  5. Hi, i am creating a new port for a specific purpose, it works very well with the most of datatypes, but i got an error trying to support sc_logic. in this example the behavior is if my_event is detected a write is forced. but if it is an sc_logic I forced sc_logic_z but if it is other datatype I force 0. my intention is to detect if the object is sc_logic or not using typeid(T).name(), what in my operative system is "N5sc_dt8sc_logicE" , but i am getting this error: In file included from ./main.cpp:42:0: ./port_new.h: In instantiation of ‘void sc_out_new<T>::write(T) [with T = double]’: ./stage1.cpp:67:15: required from here ./port_upf.h:194:8: error: no match for ‘operator=’ (operand types are ‘sc_core::sc_out<double>’ and ‘const sc_dt::sc_logic’) out=SC_LOGIC_Z; any idea about how i can write both types using the same class ??? my module: struct numgen : sc_module { sc_out_new<double> out1; //output 1 sc_out_new<sc_logic> out2; ... } my class: Template<typename T> class sc_out_new : public sc_channel { ... SC_HAS_PROCESS(sc_out_new); sc_in_upf(const sc_module_name& nmod) : sc_channel(nmod){ SC_METHOD(write_out); sensitive << my_event } void write_out{ if(typeid(T).name() == "N5sc_dt8sc_logicE"){ out.write(SC_LOGIC_Z); }else{ out.write(0); } } } thanks for the help
  6. let me explain better, what I need is to represent power domains in SystemC for functional verification, reading the UPF file. The idea is to make the implementation hidden for the user, then it would be automatic and transparent for the user. That said, i thought that i could modify the sc_out class using inheritance, to be aware about the domain to which belongs, but then i need to turn off the signal if the domain is off. to do that, i thought that i would need to create a sc_out with sensitivity, then it automatically could monitor the status of the domain, and if the status in OFF, it automatically could be set to 0. I'd say that it is possible, but i'd like to know the opinion of expert people like you. what parts would I have to modify? thanks!
  7. Hi! I am new on this, and i am learning systemC. i am working on an academic project, then i wonder if it is possible (after some systemC code modifications) to generate primitive_ports that respond to a sensitivity list? then I could generate a function that set to 0 each port when a global signal is set to a specific state. is it possible? what parts of systemC code i'd need to modify? thanks a lot in advance for the help and guidance!
×
×
  • Create New...