cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Scholar
Scholar
7,294 Views
Registered: ‎11-21-2013

adding a UTC timestamp into the canvas or RTL

Jump to solution

Hi All,

 

I want to add a results of TCL command 'clock seconds' into a register in one of the IPs.

 

Ideally we did this through some .vh file however, when the output products are generated, the IP is copied into /ipshared/ folder and as such, the path to that .vh file is no longer valid. I also tried adding it to the main project and this is not good either.

 

I can think of a way to just connect the interface port to this value through xlconstant, i.e. see below

 

startgroup
create_bd_cell -type ip -vlnv xilinx.com:ip:xlconstant:1.1 xlconstant_0
endgroup

Then I can perhaps do something like this:

 

startgroup

set_property -dict [list CONFIG.CONST_WIDTH {32} CONFIG.CONST_VAL {[clock seconds]}] [get_bd_cells xlconstant_0]
endgroup

 

Would this work? Is there a better way to get this?

 

Thanks

Vlad

Vladislav Muravin
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Scholar
Scholar
12,288 Views
Registered: ‎11-21-2013

Re: adding a UTC timestamp into the canvas or RTL

Jump to solution

Ah... Thanks Randy, it worked.

Cheers Vlad

 

Vivado% create_timestamp
Wrote  : </home/IGNIS/vmuravin/projects/orchestra/vivado/eclipse/eclipse1/eclipse1/eclipse1.srcs/sources_1/bd/system/system.bd>
Vivado%

Vladislav Muravin

View solution in original post

0 Kudos
3 Replies
Scholar
Scholar
7,267 Views
Registered: ‎11-21-2013

Re: adding a UTC timestamp into the canvas or RTL

Jump to solution

Hi Xilinx,

 

This does not work! I added the following proc to our main project management TCL file, and I get an error, see it after the proc. If I use set t [clock seconds] and replace it with $t, I get the same error.

 

How can we pass string in a form of a variable to the main BD??? I thought this is a TCLized business A-Z.

 

Thanks Vlad

 

proc create_timestamp {args} {
    set mainprj::utc [clock seconds]
    open_bd_design [current_project]/[current_project].srcs/sources_1/bd/system/system.bd
    set_property -dict [list CONFIG.CONST_VAL {[clock seconds]}] [get_bd_cells xlconstant_timestamp]
    save_bd_design
    close_bd_design [get_bd_designs system]
}

 

ERROR: [IP_Flow 19-3452] Invalid long/float value '[clock seconds]' specified for parameter 'Const Val(CONST_VAL)' for BD Cell '/xlconstant_timestamp'.
INFO: [IP_Flow 19-3438] Customization errors found on '/xlconstant_timestamp'. Restoring to previous valid configuration.
ERROR: [BD 41-245] set_property error - Invalid long/float value '[clock seconds]' specified for parameter 'Const Val(CONST_VAL)' for BD Cell '/xlconstant_timestamp'.
Customization errors found on '/xlconstant_timestamp'. Restoring to previous valid configuration.



Vladislav Muravin
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
7,263 Views
Registered: ‎01-04-2013

Re: adding a UTC timestamp into the canvas or RTL

Jump to solution

Try the following:

set_property -dict [list CONFIG.CONST_VAL [clock seconds]] [get_bd_cells xlconstant_timestamp]

 

I think the {} prevents the evaluation of [clock seconds]

 

Regards,
Randy

Highlighted
Scholar
Scholar
12,289 Views
Registered: ‎11-21-2013

Re: adding a UTC timestamp into the canvas or RTL

Jump to solution

Ah... Thanks Randy, it worked.

Cheers Vlad

 

Vivado% create_timestamp
Wrote  : </home/IGNIS/vmuravin/projects/orchestra/vivado/eclipse/eclipse1/eclipse1/eclipse1.srcs/sources_1/bd/system/system.bd>
Vivado%

Vladislav Muravin

View solution in original post

0 Kudos