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
0a48d743
Commit
0a48d743
authored
Jan 18, 2018
by
Jens Korinth
Browse files
Improve logging in tapasco::ip
parent
5c397f7d
Changes
1
Show whitespace changes
Inline
Side-by-side
common/ip.tcl
View file @
0a48d743
...
...
@@ -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
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