Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
090f4481
Commit
090f4481
authored
Jan 18, 2018
by
Jens Korinth
Browse files
Improve logging in tapasco::ip
parent
a6e9559d
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/ip.tcl
View file @
090f4481
...
...
@@ -344,16 +344,19 @@ namespace eval ::tapasco::ip {
# @param name Name of the instance.
# @param ids List of kernel IDs.
proc create_tapasco_status
{
name
{
ids
{}}}
{
variable stdcomps
set vlnv
[
tapasco::ip::get_vlnv
"tapasco_status"
]
puts
"Creating custom status core ..."
puts
" VLNV:
$vlnv
"
puts
" IDs :
$ids
"
puts
" sourcing JSON lib ..."
source -notrace
"
$::env
(TAPASCO_HOME)/common/json_write.tcl"
package require json::write
puts
" making JSON config file ..."
set json
[
make_status_config_json
]
set json_file
"
[
file normalize
[
pwd
]]
/tapasco_status.json"
puts
"Creating TPC Status ..."
puts
" VLNV:
[
dict get $stdcomps tapasco_status vlnv
]
"
puts
" IDs :
$ids
"
puts
" Status:
$json
_file
$json
"
puts
" JSON configuration in
$json
_file: "
puts
"
$json
"
if
{[
catch
{
open $json_file
"w"
}
f
]}
{
error
"could not open file
$json
_file!"
}
else
{
...
...
@@ -385,16 +388,19 @@ namespace eval ::tapasco::ip {
set_property IP_REPO_PATHS $ip_repo_paths
[
current_project
]
update_ip_catalog
puts
" done!"
# create the IP core
return
[
create_bd_cell -type ip -vlnv
[
dict get $stdcomps tapasco_status
vlnv
]
$name
]
return
[
create_bd_cell -type ip -vlnv
$
vlnv $name
]
}
# Generate JSON configuration for the status core.
proc make_status_config_json
{}
{
puts
" getting adddress map ..."
set addr
[
platform::get_address_map
[
platform::get_pe_base_address
]]
set slots
[
list
]
set slot_id 0
foreach intf
[
dict keys $addr
]
{
puts
" processing
$intf:
[
dict get $addr $intf kind
]
..."
switch
[
dict get $addr $intf
"kind"
]
{
"register"
{
set kind
[
format
"%d"
[
regsub
{
.*target_ip_
([
0-9
][
0-9
])
.*
}
$intf
{
\1
}]]
...
...
@@ -410,6 +416,7 @@ namespace eval ::tapasco::ip {
default
{
error
"invalid kind:
[
dict get $addr $intf kind
]
"
}
}
}
puts
" finished address map, composing JSON ..."
set regex
{([
0-9
][
0-9
][
0-9
][
0-9
])
.
([
0-9
][
0-9
]
*
)}
set no_pes
[
llength
[
arch::get_processing_elements
]]
...
...
Jens Korinth
@jk
mentioned in commit
dcc6c418
·
Jan 25, 2018
mentioned in commit
dcc6c418
mentioned in commit dcc6c41810f14ca7a878a4b58fc8a6542d7f3535
Toggle commit list
Jens Korinth
@jk
mentioned in commit
17f0d672
·
Mar 05, 2018
mentioned in commit
17f0d672
mentioned in commit 17f0d67240ebf5d7e1d0be9162d272b04256c47d
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment