0

I am using e (specman) in my project. I build verification environment for uart. I have a struct which is like any_sequence_item named uart_frame_s.

I want to add scoreboard for the tx in the uart. I have the following instance in the uart_tx_agent:

uart_monitor: uart_tx_monitor_u is instance;

Definition of the scoreboard:

unit uart_tx_scoreboard_u like uvm_scoreboard{
scbd_port frame_add : add uart_frame_s;
scbd_port frame_match : match uart_frame_s;
};

I try to connect by:

connect_ports() is also {
      uart_monitor.uart_frame_s_started.connect(tx_scb.uart_frame_s_add);
      uart_monitor.uart_frame_s_ended.connect(tx_scb.uart_frame_s_match);
};

where: uart_scb (scoreboard) is instance in uart_tx_agent

Definition of the TLM ports in the monitor:

uart_frame_s_started : out iterface_port of tlm_analysis of uart_frame_s is instance;
uart_frame_s_ended : out iterface_port of tlm_analysis of uart_frame_s is instance;

I get the following errors: Error: 'uart_monitor' (of 'uart_tx_monitor_u') does not have 'uart_frame_S_started'field.... Error: 'uart_monitor' (of 'uart_tx_monitor_u') does not have 'uart_frame_S_ended'field

Sara p
  • 31
  • 6

1 Answers1

0

from the information that you have provided above, I can conclude the following:

1.the e scoreboard comes with predefined TLM implementation ports that you need to connect the monitor TLM output ports to.It seems like you did not define the TLM ports in your monitor. Pleas define those TLM ports as they are required when connecting to the scoreboard (there are examples for that in the scoreboard documentation). What I suggest is that as soon as you finish collecting the frame from the bus , emit an event that notifies that a frame was completed (I guess you can call it "uart_frame_s_endded" ), then upon that event emit , send the collected frame to the scoreboard through the Monitor's TLM output ports for add/match. ( I guess 'add' would be appropriate for UART tx).

  1. if the ports are defined, make sure to use the connect_portS() function in a place in the code that the parser will read later than the port definition.

just an FYI:

  1. it seems like you defined the scoreboard from within the Agent. (seems like tx_scbd and uart_monitor are under the same hierarchy. It is considered 'bad practice' to put a system level component (scoreboard) inside an uVC (which in this case is a UART interface component).

hopw this helps

yuvalg
  • 331
  • 1
  • 6
  • 1.I connected the ports (see `connect_ports() is also`) 2. Why shouldn't the scoreboard be in the agent as well? – Sara p Dec 28 '17 at 05:56
  • 1. Specman thinks there are not ports with these name. Hence it issued the error above. can you paste the TLM port definition in your question above (the original question). 2. the whole point of eRM is to write reusable code. a scoreboard is an application specific component that does not only serve a UART interface. (for example, if you have two interface , each with a different protocol, and you want to match packets going into one and coming out of the other.) the scoreboard should connect to the monitor in both interface UVCs and not be in one of them). – yuvalg Dec 28 '17 at 06:54
  • I added what you have asked. – Sara p Dec 28 '17 at 08:00
  • Hi Sara, what about the declaration of the TLM output ports that should be defined in the 'uart_monitor'? can you paste the definition of those ports in your original question? – yuvalg Dec 28 '17 at 22:19
  • I added what you have asked – Sara p Dec 31 '17 at 16:12
  • 1. are you sure you are loading the file that you are defining the TLM ports in? – yuvalg Jan 01 '18 at 04:20
  • 2. maybe you are extending the wrong type? and defining the TLM ports under the wrong subtype. 3. maybe you can paste the entire TLM definition code with eh 'extend' statement. – yuvalg Jan 01 '18 at 04:31
  • in short, it doesn't seem like you are doing something wrong semantically. maybe there is linking issue, or ordering issue that you didn't notice. I suggest that you either remove the 'connect_ports()' extension and do 'test' in specman , then explore your monitors to see that they have the TLM ports you expect them to have, or do a WebEx with one of the Cadence support reps so that they can resolve this for you. – yuvalg Jan 01 '18 at 04:33
  • uart_frame_s_started and uart_frame_s_ended are not ports. The are events. Please look in Universal Verification Methodology (UVM) e User Guide of Cadence - Monitor section. – Sara p Jan 03 '18 at 09:54
  • you connect connect an event to a TLM port., you need to define TLM ports to connect to the add/match port. look for examples in the documentation. in the example you are referring to 'packet_ended' is a TLM port. – yuvalg Jan 04 '18 at 06:57