Difference between DVSEC, VSEC and RCRB - pci

Can someone please explain what is difference between VSEC and DVSEC.
As I understood VSEC is tied with vendorID but DVSEC not, but still not clear how?
And what is Rot complex register block - RCRB? Why user need it when there is DVSEC?

VSEC is intended to be used by a single vendor. The Vendor ID of the device controls the format and contents of the VSEC structure.
DVSEC is intended to allow a single structure type to be used by multiple coordinated vendors. To support this, DVSEC has a DVSEC Vender ID field identifying the vendor who defined the format of the DVSEC structure, which may be different from the Vendor ID of the device containing the DVSEC structure. This allows multiple device vendors to use the same DVSEC definition.
RCRB is defined by the PCI-SIG, so it is unrelated to the vendor-defined capabilities.

RCRB is for RCIEP (Root Complex Integrated End points), it provides a base address. RCRB+offset points to the appropriate registers of the RCiEP config space.
BAR for PCIe EP = RCRB for RCiEP.
CXL 1.1 devices are also enumerated as RCiEP, hence use RCRB+offset for attributes such as link status registers etc. Hope lspci is updated for this at some point.

Related

Using ampersand in SSAS Tabular models

Some people in my company have gone to great lengths to remove & characters from data and measure names in our Tabular models. I wasn't around when they made this decision, but it destroys readability in our financial reporting. Instead of R&D and SG&A in our statements, we have RD and SGA.
The offenders are no longer around to answer for their crimes. I am trying to convince my co-workers to re-add the &, but they won't budge without some idea why this was done in the first place. My best guess is that a consultant told them not to use & in models. I think they meant in object names only, but our team got carried away. I've been able to find this page that says & was a reserved character in Compatibility Level 1100, but that goes back to SQL Server 2012! I think our lowest environment is SSAS 2017.
Am I missing anything or can we re-add & to our data and measure names? Is there any reason you would avoid the use of & anywhere in an SSAS tabular model? Links to documentation appreciated!
https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/olap-physical/object-naming-rules-analysis-services?view=asallproducts-allversions
Exceptions: When Reserved Characters are Allowed
As noted, databases of a specific modality and compatibility level can have object names that include reserved characters. Dimension attribute, hierarchy, level, measure and KPI object names can include reserved characters, for tabular databases (1103 or higher) that allow the use of extended characters:
Server mode and database compatibility level Reserved characters allowed?
Databases can have a ModelType of default. Default is equivalent to multidimensional, and thus does not support the use of reserved characters in column names.

How to use OptaPlanner ValueRange based on a planning entity's value?

Hey pretty new to optaplanner. What I have is a process planning entity that has an "availability zone" and set of computers that also have an assigned availability zone. Since a process can only be put on a computer with the same availability zone I wanted to use the ValueRangeProvider to narrow down the possible selections to include only those computers (similar to how the example in the documentation narrows down rooms based on the teachers department). But there is no direct connection from availability zones to the lower level entities (i.e. computers) the object I am working with currently only points up.
I was thinking that I could just pass in the list of computers to every process and just create a valuerange list based on that similar to what I did below, but I was hoping for a more elegant solution. I was looking at filters but I could not figure out how to create a filter to restricted a possible move based on the planning entity and that entity's planning variable.
#PlanningVariable(strengthComparatorClass = ComputerStrengthComparator.class)
public Computer getComputer() {
return computer;
}
#ValueRangeProvider(id="computerRange")
public List<Computer> getPossibleComputers(){
return computers.stream().filter(computer -> computer.getAvalibilityZone().equals(this.getAvalibilityZone())).collect(Collectors.toList());
}
If anyone knows of something I missed or has any ideas I would much appreciate the help.
That code actually works as far as I can tell. See docs "Value Range Provider from entity" (as opposed to "from solution").
That being said, it does have limitations: some features do not support it and will fail fast if combined with value ranges "from entity" - most do these days so I wouldn't worry about it. Furthermore, it prevents the Local Search from breaking that hard constraints to escape a local optima, but that's usually not a problem.

Generating sub-systems based on user input (MATLAB/SimMechanics)

The user in this webinar;
http://www.mathworks.com.au/videos/parameterizing-bodies-68850.html?form_seq=conf1134
can create new levels of links for the scissor lift by copy pasting the sub systems.
I was wondering if there was any way the number of subsystems and the joints could be automated via user input.
i.e a gui which allows the user to input the number of levels in the scissor lift and that number of levels (subsystems) is generated in SimMechanics.
If someone could provide a solution I could adapt it to the problem I'm trying to solve.
Thanks in advance!
Yes, you can automate it, as long as you know what susbsytems and what joints you want to add. The functions of interest are:
add_block(path_to_your_subsystem,path_to_destination_subsystem) (I assume your susbsystem is stored in a library). You probably want to specify the 'Position` parameter so that all blocks don't end up on top of each other. It will take some experimenting to find coordinates that work for your model and that are parameterised based on the number of susbystems to add.
add_line(path_to_subsystem_of_interest,path_to_output_port,path_to_input_port). You'll need to know which port you want to connect to which and figure out how many times you need to do this based on the number of subsystems to add. Simscape and SimMechanics are a special type of ports, and you need to refer to them correctly otherwise it won't work, see Programatically connect two subsystems for more details (note: this is undocumented as far as I know and is therefore likely to change in a future release).
So in short, yes it's possible (I've done it in the past), but it's by no means easy. See this blog for a very simple introduction.

Can tags do some calculations in a RFID system?

Can tags and readers do some calculations in a RFID system? I found many papers designed security protocols to enhance the security of RFID systems. In those protocols, tags and readers are required to do necessary calculations, such as exclusive OR (XOR), random number generation, and even hash operation and so on.
However, to my understanding, tags and readers do not have the calculation ability, then how to implement these protocols? We need design special tags and readers? Thank you very much!
This heavily depends on the type of RFID system (frequency, communication standard, etc) and the type of tag (passive or active/semi-passive).
For instance, with UHF backscatter systems, passive tags usually contain only a small memory (and logic to process commands).
In the HF range, there is ISO/IEC 14443. For that standard, there exist lots of passive tags (contactless smartcards) that contain a processing unit and can even execute complex program code. ISO/IEC 15693 (same frequency range, different standard) passive tags usually conain only memory and some additional control logic (e.g. password-based locking/unlocking). The same applies to tags in the LF range.
Active tags (regardless of the standard, as long as the standard contains some form of command response protocol if you want to interact with that functionality), however could do pretty much any calculation if they contain an appropriate processing unit.
According to wikipedia (I read the German version) one can build complex microchips into any RFID. It's also possible to add Sensor as for example GPS. RFID chips do not need to be passive, they can have a battery to power the whole RFID chip (active) or just the microprocessor (semi passive).

Is it possible to get the index of a exchange using Finance::Quote?

I need to get the index of a exchange like NASDAQ rather than the price of a specific stock in that exchange. I suppose that Finance::Quote will come to the rescue , but after a quick go-through of the document, I find it the way one can use the module for query is like:
%info = $q->fetch("australia","CML")
which means both the exchange and the stock should be specified in the query. then the question is: does the index itself can be treated as a stock and has a symbol name which can be used in the query?
Of course, if you have other way can meet my needs rather than using Finance::Quote, please feel free to write down your solution.
The problem with your question is that you are assuming that there is just one index for a particular exchange. Whilst there may well be a particular index that is dominant (eg. for stocks primarily traded on the London Stock Exchange, the FTSE 100 might be considered the main index; similarly for the NYSE it would be the Dow Jones Industrial Average) other exchanges may have a less clear leader in their collection of associated indicies (eg. for the Australian Stock Exchange, the S&P/ASX 200 and the All Ordinaries index are both frequently quoted side-by-side in the evening broadcast news).
Symbology of stocks, indicies, option chains, futures, etc is quite a complicated field in financial IT. Many of the symbology standards are backed by a data vendor (eg. Reuters, Bloomberg) and use of their standards requires a commercial license. On the other hand there are other efforts aiming to make symbology more open (Bloomberg themselves are behind one of these efforts).
I'm not familiar with the data sources of the Finance::Quote package you reference, but if you are serious about accessing market data (ie. prepared to pay for it) but don't need the cost/complexity/speed of a solution from Reuters, Bloomberg, etc, you could do alot worse than check out what Xignite offers in the way of market data accessible via web services.
the symbol for the nasdaq composite is "^IXIC". For nyse composite it's "^NYA".
each quote provider might have a different syntax though.