Custom External Ports not showing on custom IP Core - Zedboard - hardware

I am trying to build a custom IP peripheral (my_perph). I have used the CIP tool to generate the basic perph and now want to add my custom external port (my_port).
Basically I followed this tutorial http://www.programmableplanet.com/author.asp?section_id=2142&doc_id=264841.
I have added the external port definitions to the top source vhdl my_perph.vhdl .
i.e
Port(
---Add user defined ports here----
MY_PORT : out std_logic;
I then added the port to the MPD file with the syntax:
PORT MY_PORT = "", DIR = O, IO_IF = MY_PORT_0, IO_IS = MY_PORT
This didn't work so I tried losing the 0 to match the name of the VHDL declared port so:
PORT MY_PORT = "", DIR = O, IO_IF = MY_PORT, IO_IS = MY_PORT
The issue is that once I have re-scanned the IP library I get the error saying there is
NO IO_INTERFACE MATCHING MY_PORT
It seems that my custom external port MY_PORT is not being recognised in the IP design although it exists in the HDL of the included IP entity.
And even when I go to add the perph I find that this port does not show up in the info. I am totally lost as I have followed all tutorials and tired every possible thing I can think of!

Read the Platform Specification Format guide. You need to understand all of the MPD file, before just copy and pasting lines within it. The line you have needs to have a matching IO_INTERFACE section (as the error message tells you)
If your IO is not part of a "standard" IO port (see the IO_INTERFACE section of the PSF) you should be able to use simply:
PORT MY_PORT = "", DIR = O

Related

Parse a group of cisco switches, compile a list of IPs and interfaces, and then point a netmiko script to that new list. Possible?

I think my choice of words is correct. I want to take a group of switches and compile a list of Ip addresses and specific interfaces to have netmiko push commands to. For instance, scan all cisco switches and put together a list of all interfaces in vlan X and not being used. Can someone point me in the right direction of how to do this?
Sounds like you need to figure out the different steps to work out your solution.
Maybe something this:
Connect to switch
run show commands
config interface to vlan xx
I don't see any code or anything you have attempted so far but here is a simple flow for looping through a list of IP addresses.
#Python 3.7
from netmiko import ConnectionHandler
username = "user"
password = "password"
for ip in IPlist:
# netmiko code profiles;
cisco ={
"host":IP,
"username":username,
"password":password,
"device_type: "cisco_ios"
}
with ConnectHandler(**cisco) as ssh_conn:
print(sshcon.find_prompt())
# do stuff here.

Is there any method to fetch current running port of odoo server?

I need to fetch current port of odoo server? suggest any method or slution if any?
It depends on where you want to get the port from,
If you want to access the port from Javascript. (maybe you're writing a Javascript extension). It's as easy as this:
window.location.port
In python (a little bit hacky but works)
>>> with open('/path/to/config/file.conf') as f:
... for line in f:
... if line.startswith('xmlrpc_port'):
... port = line.split('=')[1].strip()
...
>>> port
'8069'
Basically you just open the config file, read all the lines and get the line that contains the xmlrpc_port and extract the port number from it

How to set Neo4J config keys in gremlin-scala?

When running a Neo4J database server standalone (on Ubuntu 14.04), configuration options are set for the global installation in etc/neo4j/neo4j.conf or possibly $NEO4J_HOME/conf/neo4j.conf.
However, when instantiating a Neo4j database from Java or Scala using Apache's Neo4jGraph class (org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph), there is no global installation, and the constructor does not (as far as I can tell) look for any configuration files.
In particular, when running the test suite for my application, I end up with many simultaneous instances of Neo4jGraph, which ends up throwing a java.net.BindException: Address already in use because all of these instances are trying to communicate over a small range of ports for online backup, which I don't actually need. These channels are set with config options dbms.backup.address (default value: 127.0.0.1:6362-6372) and dbms.backup.enabled (default value: true).
My problem would be solved by setting dbms.backup.enabled to false, or expanding the port range.
Things that have not worked:
Creating /etc/neo4j/neo4j.conf containing the line dbms.backup.enabled=false.
Creating the same file in my project's src/main/resources directory.
Creating the same file in src/main/resources/neo4j.
Manually setting the configuration property inside the Scala code:
val db = new Neo4jGraph(dataDirectory)
db.configuration.addProperty("dbms.backup.enabled",false)
or
db.configuration.addProperty("neo4j.conf.dbms.backup.enabled",false)
or
db.configuration.addProperty("gremlin.neo4j.conf.dbms.backup.enabled",false)
How should I go about setting this property?
Neo4jGraph configuration through TinkerPop is accomplished by a pass-through of configuration keys. In TinkerPop 3.x, that would mean that all Neo4j keys prefixed with gremlin.neo4j.conf that are provided via Configuration object to Neo4jGraph.open() or GraphFactory.open() will be passed down directly to the Neo4j instance. You can see examples of this here in the TinkerPop documentation on high availability configuration.
In TinkerPop 2.x, the same approach was taken however the key prefix was instead blueprints.neo4j.conf.* as discussed here.
Manipulating db.configuration after the database connection had already been opened was definitely futile.
stephen mallette's answer was on the right track, but this particular configuration doesn't appear to pass through in the way his linked example does. There is a naming mismatch between the configuration keys expected in neo4j.conf and those expected in org.neo4j.backup.OnlineBackupKernelExtension. Instead of dbms.backup.address and dbms.backup.enabled, that class looks for config keys online_backup_server and online_backup_enabled.
I was not able to get these keys passed down to the underlying Neo4jGraphAPI instance correctly. What I had to do, instead, was the following:
import org.neo4j.tinkerpop.api.impl.Neo4jFactoryImpl
import scala.collection.JavaConverters._
val factory = new Neo4jFactoryImpl()
val config = Map(
"online_backup_enabled" -> "true",
"online_backup_server" -> "0.0.0.0:6350-6359"
).asJava
val db = Neo4jGraph.open(factory.newGraphDatabase(dataDirectory,config))
With this initialization, the instance correctly listened for backups on port 6350; changing "true" to "false" disabled backup listening.
Using Neo4j 3.0.0 the following disables port listening for me (Java code)
import org.apache.commons.configuration.BaseConfiguration;
import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
BaseConfiguration conf = new BaseConfiguration();
conf.setProperty(Neo4jGraph.CONFIG_DIRECTORY, "/path/to/db");
conf.setProperty(Neo4jGraph.CONFIG_CONF + "." + "dbms.backup.enabled", "false");
graph = Neo4jGraph.open(config);

what else do I need besides $cfg['Servers'][$i]['ssl']=TRUE

When I add to my config
$cfg['Servers'][$i]['ssl'] = TRUE;
trying to connect gives
phpMyAdmin - Error #2002 -
-- The server is not responding (or the local server's socket is not correctly configured)
I suspect this is because the mysql server requires
--ssl-ca=... --ssl-cert=... --ssl-key=...
How do I put those into the phpMyAdmin configuration
Or is there some other problem that I'm missing?
It's all explained reasonably well in the manual; those options are configured through additional directives in config.inc.php.
See for instance http://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_ssl and the few paragraphs there that follow. (Or, to be more specific, see
http://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_ssl_key,
http://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_ssl_cert,
http://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_ssl_ca,
http://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_ssl_ca_path, and
http://docs.phpmyadmin.net/en/latest/config.html#cfg_Servers_ssl_ciphers).
In my case, I was able to achieve this through adding these directives:
$cfg['Servers'][$i]['ssl'] = true;
$cfg['Servers'][$i]['ssl_cert'] = '/etc/mysql/client-cert.pem';
$cfg['Servers'][$i]['ssl_ca'] = '/etc/mysql/ca-cert.pem';
$cfg['Servers'][$i]['ssl_key'] = '/etc/mysql/client-key.pem';
Adjusting of course for the correct paths on your local system. Good luck!
Just delete the my.ini file in ...wamp64\bin\mysql\mysql5.x.x and that's it this file uses the port = 3308 which is'nt the default mysql port

VB.NET : Grabbing and Tieing IP Addresses to Interfaces

I would like to find a way to grab the assigned IPv4 and IPv6 addresses to different interfaces and being able to determine which interface they're tied to.
Currently I am looping ' System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces ' and able to grab interface specific information:
For Each nic As System.Net.NetworkInformation.NetworkInterface In System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
myarr(count2, 0) = (String.Format("{0}", nic.Description))
myarr(count2, 1) = (String.Format("{0}", nic.GetPhysicalAddress))
myarr(count2, 2) = (String.Format("{0}", nic.OperationalStatus))
myarr(count2, 3) = (String.Format("{0}", nic.Speed))
count2 += 1
Next
Through this method I can't determine a simple method to grab assigned IP Addresses unfortunately.
The most common method that I can easily find with google-foo is to find your IP via going through something like the following:
Dim ipAdd As IPAddress = Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList.First(Function(f) f.AddressFamily = Sockets.AddressFamily.InterNetwork)
Which is fine and dandy but I can't determine which interface is being used nor can it determine an assigned IP Address that's not going through DNS or mulitple NICS.
I can possibly do some ghetto method of issuing a command-line command and parsing all the information out of ipconfig or getting a GUID and running through the registry but I feel like there should be an easier more effecient method.
A good example of what I want is the ability to produce a list like IPCONFIG where it has interface information and their designated IP Addresess, etc...
in you for-loop try
Dim ip = nic.GetIPProperties().UnicastAddresses(0).Address;