diff --git a/etc/armo-demo.conf b/etc/armo-demo.conf deleted file mode 100644 index 7f2e79476..000000000 --- a/etc/armo-demo.conf +++ /dev/null @@ -1,47 +0,0 @@ -# Configuration file for Mohsen and Arthur -# -# Date: 25.09.15 -# Author: Steffen Vogel -# Copyright: 2015, Institute for Automation of Complex Power Systems, EONERC -## - -stats = 0.5; -debug = 3; - -nodes = { - rtds = { - type = "socket", - layer = "udp", - local = "10.10.11.1:12000", # Local ip:port, use '*' for random port - remote = "127.0.0.1:12001", - }, - broker = { - type = "ngsi", - endpoint = "https://130.206.112.223:1026", - - ssl_verify = false, - timeout = 1, - structure = "children", - mapping = [ - "6a224113-62c4-11e5-b7be-ecf4bb16fe0c(GridSectionDataValue).value(float)" // Node: name='Linea 0 Tr' - "fca3bf58-62c4-11e5-867e-ecf4bb16fe0c(GridSectionDataValue).value(float)", // Conn: name='Linea 0 WP4_C0.1', from='Linea 0 Tr', to='Linea 0 Meter' - "fd4e0912-62c4-11e5-ba9b-ecf4bb16fe0c(GridSectionDataValue).value(float)", // Conn: name='Linea 1 WP4_C_1', from='Linea 1 N0000', to='Linea 1 N0001' - "fd4e0924-62c4-11e5-80a5-ecf4bb16fe0c(GridSectionDataValue).value(float)", // Conn: name='Linea 4 WP4_C_4', from='Linea 4 N0000', to='Linea 4 N0001' - "fd4e3036-62c4-11e5-95e9-ecf4bb16fe0c(GridSectionDataValue).value(float)", // Conn: name='Linea 7 WP4_C_9', from='Linea 7 N0000', to='Linea 7 N0002' - "fd4e5741-62c4-11e5-90ec-ecf4bb16fe0c(GridSectionDataValue).value(float)", // Conn: name='Linea 9 WP4_C_12', from='Linea 9 N0000', to='Linea 9 N0002' - "fd4e7e41-62c4-11e5-8716-ecf4bb16fe0c(GridSectionDataValue).value(float)", // Conn: name='Linea 10 WP4_C_15', from='Linea 10 N0000', to='Linea 10 N0001' - "6a232b75-62c4-11e5-8d0f-ecf4bb16fe0c(GridSectionDataValue).value(float)" // Node: name='Linea 9 N0001' - // "rtds_sub1(type_one).value(float)", // structure = flat: entityId(entityType).attributeName(attributeType) - // "rtds_sub3(type_one).v2(float)", // structure = children parentId(entityType).attributeName(attributeType) - // "rtds_sub2(type_two).i1(float)" // Example: fa846ed3-5871-11e5-b0cd-ecf4bb16fe0c(GridSectionDataValue).value(float) - ] - } -}; - -paths = ( - { - in = "rtds", # Name of the node we listen to (see above) - out = "broker", # And we loop back to the origin - rate = 10 # in Requests / sec - } -); diff --git a/etc/example.conf b/etc/example.conf index d27994b05..90ce35282 100644 --- a/etc/example.conf +++ b/etc/example.conf @@ -9,27 +9,13 @@ # http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files # # Author: Steffen Vogel -# Copyright: 2015, Institute for Automation of Complex Power Systems, EONERC +# Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC ## -############ Global Options ############ - -affinity = 0x02; # Mask of cores the server should run on - # This also maps the NIC interrupts to those cores! - -priority = 50; # Priority for the server tasks. - # Usually the server is using a real-time FIFO - # scheduling algorithm - -debug = 5; # The level of verbosity for debug messages - # Higher number => increased verbosity - -stats = 3; # The interval in seconds to print path statistics. - # A value of 0 disables the statistics. - -name = "villas-acs" # The name of this VILLASnode. Might by used by node-types - # to identify themselves (default is the hostname). - +# Some global settings are used by multiple configuration files +# and therefore defined in separate files +@include "global.conf" +@include "plugins.conf" ############ Dictionary of nodes ############ diff --git a/etc/fpga-simple.conf b/etc/fpga-simple.conf index 9da5889ef..7135b895b 100644 --- a/etc/fpga-simple.conf +++ b/etc/fpga-simple.conf @@ -1,3 +1,22 @@ +# Example configuration file for VILLASnode +# +# This example includes all valid configuration options for the server. +# Please note, that using all options at the same time does not really +# makes sense. The purpose of this example is to serve as a reference. +# +# The syntax of this file is similar to JSON. +# A detailed description of the format can be found here: +# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files +# +# Author: Steffen Vogel +# Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC +## + +# Some global settings are used by multiple configuration files +# and therefore defined in separate files +@include "global.conf" +@include "plugins.conf" + fpga = { /* Card identification */ id = "10ee:7022"; diff --git a/etc/fpga.conf b/etc/fpga.conf index 6c7ee4c0b..43c95eb44 100644 --- a/etc/fpga.conf +++ b/etc/fpga.conf @@ -8,138 +8,117 @@ # Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC ## -############ Global Options ############ +# Some global settings are used by multiple configuration files +# and therefore defined in separate files +@include "global.conf" +@include "plugins.conf" -affinity = 0x0C; # Mask of cores the server should run on - # This also maps the NIC interrupts to those cores! +############ Dictionary of FPGAs ############ -priority = 50; # Priority for the server tasks. - # Usually the server is using a real-time FIFO - # scheduling algorithm +fpgas = { + vc707 = { + id = "10ee:7022"; # Card identification + slot = "01:00.0"; # Usually only id or slot is required -debug = 5; # The level of verbosity for debug messages - # Higher number => increased verbosity + do_reset = true; # Perform a full reset of the FPGA board + # Requires a IP core named 'axi_reset_0' -stats = 3; # The interval in seconds to print path statistics. - # A value of 0 disables the statistics. - -name = "villas-acs" # The name of this VILLASnode. Might by used by node-types - # to identify themselves (default is the hostname). - -############ FPGA configuration ############ - -fpga = { - id = "10ee:7022"; # Card identification - slot = "01:00.0"; # Usually only id or slot is required - - do_reset = true; # Perform a full reset of the FPGA board - # Requires a IP core named 'axi_reset_0' - - ############ List of IP cores on FPGA ############ - # - # Every IP core can have the following settings: - # baseaddr Baseaddress as accessible from BAR0 memory region - # irq Interrupt index of MSI interrupt controller - # port Port index of AXI4-Stream interconnect + ############ List of IP cores on FPGA ############ + # + # Every IP core can have the following settings: + # baseaddr Baseaddress as accessible from BAR0 memory region + # irq Interrupt index of MSI interrupt controller + # port Port index of AXI4-Stream interconnect - ips = { - ### Utility IPs - axi_pcie_intc_0 = { - vlnv = "acs.eonerc.rwth-aachen.de:user:axi_pcie_intc:1.0"; - baseaddr = 0xb000; - }, - switch_0 = { - vlnv = "xilinx.com:ip:axis_interconnect:2.1" - baseaddr = 0x5000; - num_ports = 10; - }, - axi_reset_0 = { - vlnv = "xilinx.com:ip:axi_gpio:2.0"; - baseaddr = 0x7000; - }, - timer_0 = { - vlnv = "xilinx.com:ip:axi_timer:2.0"; - baseaddr = 0x4000; - irq = 0; - }, + ips = { + ### Utility IPs + axi_pcie_intc_0 = { + vlnv = "acs.eonerc.rwth-aachen.de:user:axi_pcie_intc:1.0"; + baseaddr = 0xb000; + }, + switch_0 = { + vlnv = "xilinx.com:ip:axis_interconnect:2.1" + baseaddr = 0x5000; + num_ports = 10; + }, + axi_reset_0 = { + vlnv = "xilinx.com:ip:axi_gpio:2.0"; + baseaddr = 0x7000; + }, + timer_0 = { + vlnv = "xilinx.com:ip:axi_timer:2.0"; + baseaddr = 0x4000; + irq = 0; + }, - ### Data mover IPs - dma_0 = { - vlnv = "xilinx.com:ip:axi_dma:7.1"; - baseaddr = 0x3000; - port = 1; - irq = 3; /* 3 - 4 */ - }, - dma_1 = { - vlnv = "xilinx.com:ip:axi_dma:7.1"; - baseaddr = 0x2000; - port = 6; - irq = 3; /* 3 - 4 */ - }, - fifo_mm_s_0 = { - vlnv = "xilinx.com:ip:axi_fifo_mm_s:4.1"; - baseaddr = 0x6000; - baseaddr_axi4 = 0xC000; - port = 2; - irq = 2; - }, + ### Data mover IPs + dma_0 = { + vlnv = "xilinx.com:ip:axi_dma:7.1"; + baseaddr = 0x3000; + port = 1; + irq = 3; /* 3 - 4 */ + }, + dma_1 = { + vlnv = "xilinx.com:ip:axi_dma:7.1"; + baseaddr = 0x2000; + port = 6; + irq = 3; /* 3 - 4 */ + }, + fifo_mm_s_0 = { + vlnv = "xilinx.com:ip:axi_fifo_mm_s:4.1"; + baseaddr = 0x6000; + baseaddr_axi4 = 0xC000; + port = 2; + irq = 2; + }, - ### Interface IPs - rtds_axis_0 = { - vlnv = "acs.eonerc.rwth-aachen.de:user:rtds_axis:1.0"; - baseaddr = 0x8000; - port = 0; - irq = 5; /* 5 -7 */ - }, + ### Interface IPs + rtds_axis_0 = { + vlnv = "acs.eonerc.rwth-aachen.de:user:rtds_axis:1.0"; + baseaddr = 0x8000; + port = 0; + irq = 5; /* 5 -7 */ + }, - ### Model IPs - hls_dft_0 = { - vlnv = "acs.eonerc.rwth-aachen.de:hls:hls_dft:1.0"; - baseaddr = 0x9000; - port = 5; - irq = 1; + ### Model IPs + hls_dft_0 = { + vlnv = "acs.eonerc.rwth-aachen.de:hls:hls_dft:1.0"; + baseaddr = 0x9000; + port = 5; + irq = 1; - period = 400; /* in samples: 20ms / 50uS = 400*/ - harmonics = [ 0, 1, 3, 5, 7 ] - decimation = 0; /* 0 = disabled */ - //harmonics = [ 0, 1, 2, 5, 22 ] - }, - axis_data_fifo_0 = { - vlnv = "xilinx.com:ip:axis_data_fifo:1.1"; - port = 3; - }, - axis_data_fifo_1 = { - vlnv = "xilinx.com:ip:axis_data_fifo:1.1"; - port = 6; - }, + period = 400; /* in samples: 20ms / 50uS = 400*/ + harmonics = [ 0, 1, 3, 5, 7 ] + decimation = 0; /* 0 = disabled */ + //harmonics = [ 0, 1, 2, 5, 22 ] + }, + axis_data_fifo_0 = { + vlnv = "xilinx.com:ip:axis_data_fifo:1.1"; + port = 3; + }, + axis_data_fifo_1 = { + vlnv = "xilinx.com:ip:axis_data_fifo:1.1"; + port = 6; + }, + } + + ############ Switch config ############ + # Requires a single IP core with VLNV: + # xilinx.com:ip:axis_interconnect + paths = ( + // { in = "fifo_mm_s_0", out = "fifo_mm_s_0" }, # Loopback fifo_mm_s_0 + // { in = "dma_0", out = "dma_0" }, # Loopback dma_0 + // { in = "dma_1", out = "dma_1" } # Loopback dma_1 + // { in = "rtds_axis_0", out = "fifo_mm_s_0", reverse = true } # Linux <-> RTDS + // { in = "rtds_axis_0", out = "dma_0", reverse = true } # Linux (dma_0) <-> RTDS + { in = "rtds_axis_0", out = "dma_1", reverse = true } # Linux (dma_1) <-> RTDS + // { in = "rtds_axis_0", out = "fifo_mm_s_0", reverse = true } # Linux (fifo_mm_s_0) <-> RTDS + // { in = "dma_0", out = "hls_dft_0", reverse = true } # DFT <-> Linux + // { in = "rtds_axis_0", out = "hls_dft_0", reverse = true }, # DFT <-> RTDS + ) } - - ############ Switch config ############ - # Requires a single IP core with VLNV: - # xilinx.com:ip:axis_interconnect - paths = ( -// { in = "fifo_mm_s_0", out = "fifo_mm_s_0" }, # Loopback fifo_mm_s_0 -// { in = "dma_0", out = "dma_0" }, # Loopback dma_0 -// { in = "dma_1", out = "dma_1" } # Loopback dma_1 -// { in = "rtds_axis_0", out = "fifo_mm_s_0", reverse = true } # Linux <-> RTDS -// { in = "rtds_axis_0", out = "dma_0", reverse = true } # Linux (dma_0) <-> RTDS - { in = "rtds_axis_0", out = "dma_1", reverse = true } # Linux (dma_1) <-> RTDS -// { in = "rtds_axis_0", out = "fifo_mm_s_0", reverse = true } # Linux (fifo_mm_s_0) <-> RTDS -// { in = "dma_0", out = "hls_dft_0", reverse = true } # DFT <-> Linux -// { in = "rtds_axis_0", out = "hls_dft_0", reverse = true }, # DFT <-> RTDS - ) } -############ List of plugins ############ -# -# Additional node-types, hooks or VILLASfpga IP cores -# can be loaded by compiling them into a shared library and -# adding them to this list - -plugins = [ - "./lib/cbmodels/simple_circuit.so" -] - ############ Dictionary of nodes ############ nodes = { @@ -161,10 +140,10 @@ nodes = { simple_circuit = { type = "cbuilder"; model = "simple_circuit", - timestep = 25e-6; + timestep = 25e-6; # in seconds parameters = [ - 1.0, /**< R2 = 1 Ohm */ - 0.001 /**< C2 = 1000 uF */ + 1.0, # R2 = 1 Ohm + 0.001 # C2 = 1000 uF ]; } } diff --git a/etc/global.conf b/etc/global.conf new file mode 100644 index 000000000..f3a5e21f5 --- /dev/null +++ b/etc/global.conf @@ -0,0 +1,36 @@ +# Global configuration file for VILLASnode +# +# This example includes all valid configuration options for the server. +# Please note, that using all options at the same time does not really +# makes sense. The purpose of this example is to serve as a reference. +# +# The syntax of this file is similar to JSON. +# A detailed description of the format can be found here: +# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files +# +# Author: Steffen Vogel +# Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC +## + +############ Global Options ############ + +affinity = 0x02; # Mask of cores the server should run on + # This also maps the NIC interrupts to those cores! + +priority = 50; # Priority for the server tasks. + # Usually the server is using a real-time FIFO + # scheduling algorithm + +debug = 5; # The level of verbosity for debug messages + # Higher number => increased verbosity + +stats = 3; # The interval in seconds to print path statistics. + # A value of 0 disables the statistics. + +name = "villas-acs" # The name of this VILLASnode. Might by used by node-types + # to identify themselves (default is the hostname). + +http = { + htdocs = "/villas/contrib/websocket", # Root directory of internal webserver + port = 80 # Port for HTTP connections +} \ No newline at end of file diff --git a/etc/plugins.conf b/etc/plugins.conf new file mode 100644 index 000000000..5de1b07ed --- /dev/null +++ b/etc/plugins.conf @@ -0,0 +1,23 @@ +# Example plugins configuration file for VILLASnode +# +# This example includes all valid configuration options for the server. +# Please note, that using all options at the same time does not really +# makes sense. The purpose of this example is to serve as a reference. +# +# The syntax of this file is similar to JSON. +# A detailed description of the format can be found here: +# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files +# +# Author: Steffen Vogel +# Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC +## + +############ List of plugins ############ +# +# Additional node-types, hooks or VILLASfpga IP cores +# can be loaded by compiling them into a shared library and +# adding them to this list + +plugins = [ + "./lib/cbmodels/simple_circuit.so" +] \ No newline at end of file diff --git a/etc/websocket.conf b/etc/websocket.conf new file mode 100644 index 000000000..63d1a065e --- /dev/null +++ b/etc/websocket.conf @@ -0,0 +1,59 @@ +# Example configuration file for VILLASnode +# +# This example includes all valid configuration options for the server. +# Please note, that using all options at the same time does not really +# makes sense. The purpose of this example is to serve as a reference. +# +# The syntax of this file is similar to JSON. +# A detailed description of the format can be found here: +# http://www.hyperrealm.com/libconfig/libconfig_manual.html#Configuration-Files +# +# Author: Steffen Vogel +# Copyright: 2016, Institute for Automation of Complex Power Systems, EONERC +## + +# Some global settings are used by multiple configuration files +# and therefore defined in separate files +@include "global.conf" +@include "plugins.conf" + +############ Dictionary of nodes ############ + +nodes = { + file = { + type = "file", + #vectorize = 10, + in = { + path = "/test_fifo" + } + }, + + ws = { + type = "websocket", + unit = "MVa", + units = [ "V", "A", "Var" ], + description = "Das ist ein Test", + vectorize = 100, + source = { + simulator = "OP5600", + location = "ACS lab" + } + } + + ws_stats = { + type = "websocket", + description = "Statistics", + @include "websocket-stats.conf" /* This adds a caption to the statistics plot */ + } +}; + + +############ List of paths ############ + +paths = ( + { + in = "file", + out = "ws", + hook = [ "stats_send:ws_stats" ] + } +); diff --git a/etc/ws.conf b/etc/ws.conf deleted file mode 100644 index b8b5ac931..000000000 --- a/etc/ws.conf +++ /dev/null @@ -1,55 +0,0 @@ - -############ Global Options ############ - -debug = 10; # The level of verbosity for debug messages - # Higher number => increased verbosity - -stats = 1; # The interval in seconds to print path statistics. - # A value of 0 disables the statistics. - - -############ nodes ############ - -nodes = { - file = { - type = "file", - in = { - path = "input.log", # These options specify the path prefix where the the files are stored - mode = "r", # The mode in which files should be opened (see open(2)) - } - }, - - ws = { - type = "websocket", - unit = "MVa", - units = [ "V", "A", "Var" ], - description = "Das ist ein Test", - source = { - simulator = "OP5600", - location = "ACS lab" - } - } - - ws_stats = { - type = "websocket", - description = "Statistics for path: ws => ws", - @include "websocket-stats.conf" /* This adds a caption to the statistics plot */ - } -}; - - -############ List of paths ############ - -paths = ( - { - in = "file", - out = "ws", - hook = [ "stats_send:ws_stats" ], - rate = 20 - } -); - -http = { - htdocs = "/s2ss/contrib/websocket", - port = 80 -}