串行线上的MQTT-SN(蓝牙,CAN,RS485,...)(MQTT-SN over Serial Wire (Bluetooth, CAN, RS485, …))
我发现这个答案RSMB MQTT-SN和蓝牙 ,但我不确定这是否真的是正确的答案。
所以第二个问题 - 我是新来的Stackoverflow,所以我不能直接评论。
...
你确定这里真的需要货代吗? 我读了MQTT-SN规范,对我来说,看起来MQTT-SN是用于UDP的,而UDP是无连接的。 所以我认为可以通过串行模拟UDP来实现点对点连接。
那为什么不呢?
mqtt-sn客户端---串行 - >>任何收音机<< - 串行--- mqtt-sn串行brigdge
在MQTT-SN串行桥接器端,我也可以运行一个连接到我选择的真实MQTT代理的网关。
我从规格中的图1中读出。 我不清楚货运公司的好处是什么? 何时应该有人使用它等等...
谢谢。 马蒂亚斯
I found this Answer RSMB MQTT-SN & Bluetooth, but I am not sure if this is really the correct answer at all.
So a second Question - I am new to Stackoverflow so I cannot comment directly.
...
Are you sure that a forwarder is really needed here? I read the MQTT-SN spec and for me it looks like MQTT-SN is for UDP and UDP is connectionless. So I think it is possible so simulate UDP over serial for one point to point connection.
So why not...
mqtt-sn client---serial-->> any radio <<--serial---mqtt-sn serial brigdge
And on the MQTT-SN serial bridge side I can also run a Gateway which connects to a real MQTT broker of my choice.
I read that out from figure 1 in the specs. I do not clearly understand what´s the benefit of a forwarder is? And when should someone use it and so on ...
thanks. Mathias
原文:https://stackoverflow.com/questions/34177922
最满意答案
你的链式信号向后,第一个输入要显示相等:
architecture comp32_arch of comp32 is component comp1 port (a,b,g,l,e : in std_logic ; great,less,equal : out std_logic); end component comp1; signal gre : std_logic_vector(BW downto 0); signal les : std_logic_vector(BW downto 0); signal equ : std_logic_vector(BW downto 0); begin gre(BW) <= '0'; -- gre(0) <= '0'; les(BW) <= '0'; -- les(0) <= '0'; equ(BW) <= '1'; -- equ(0) <= '0'; gen: for i in 0 to BW-1 generate biti: comp1 port map ( a => a_32(i), b => b_32(i), g => gre(i+1), -- gre(i), l => les(i+1), -- les(i), e => equ(i+1), -- equ(i), great => gre(i), -- gre(i+1), less => les(i), -- les(i+1), equal => equ(i) -- equ(i+1) ); end generate; g_32 <= gre(0); -- gre(BW);-- (BW-1); l_32 <= les(0); -- les(BW); -- (BW-1); e_32 <= equ(0); -- equ(BW); -- (BW-1); end architecture comp32_arch;
这给了:
没有等于的最重要的位定义小于或大于。 如果他们都是平等的,那么一直传播。
You had your chained signals backward, and the first inputs want to show equal:
architecture comp32_arch of comp32 is component comp1 port (a,b,g,l,e : in std_logic ; great,less,equal : out std_logic); end component comp1; signal gre : std_logic_vector(BW downto 0); signal les : std_logic_vector(BW downto 0); signal equ : std_logic_vector(BW downto 0); begin gre(BW) <= '0'; -- gre(0) <= '0'; les(BW) <= '0'; -- les(0) <= '0'; equ(BW) <= '1'; -- equ(0) <= '0'; gen: for i in 0 to BW-1 generate biti: comp1 port map ( a => a_32(i), b => b_32(i), g => gre(i+1), -- gre(i), l => les(i+1), -- les(i), e => equ(i+1), -- equ(i), great => gre(i), -- gre(i+1), less => les(i), -- les(i+1), equal => equ(i) -- equ(i+1) ); end generate; g_32 <= gre(0); -- gre(BW);-- (BW-1); l_32 <= les(0); -- les(BW); -- (BW-1); e_32 <= equ(0); -- equ(BW); -- (BW-1); end architecture comp32_arch;
And that gives:
The most significant bit without an equals defines either less than or greater than. If they're all equal that propagates all the way through.
相关问答
更多-
MATLAB程序主要是用来干什么的?他是语言吗?他与c语言有关系吗?[2022-10-12]
是一门语言,与fortran语法最为接近。主要是把一些数学上的算法编好了,mat原意就是矩阵实验室 -
您的信号out_ALU被声明为您实体的输入。 这就是为什么你不能给它分配一个信号(它是只读的)。 将其更改为out,它可能会编译: entity AlU is Port ( A : in STD_LOGIC_VECTOR (31 downto 0); ---== A input Vector with 32 Bit B : in STD_LOGIC_VECTOR (31 downto 0); ---== B input Vector with 32 Bi ...
-
VHDL直接比较矢量(VHDL directly comparing vectors)[2021-09-11]
答案是肯定的,您可以直接比较相同类型和子类型指示的两种数组类型。 但是,您的示例代码无效。 表达式a=b的结果是布尔值。 您可以通过分配out1和out2将其转换为std_logic。 此上下文中的if语句必须位于流程语句中。 您也不需要两个输出: architecture foo of Comparator1 is begin UNLABELED: process (a,b) begin if a = b then out1 <= '1'; ... -
与另外两个标准兼容的模拟器一起发现了三类错误。 语义错误 : UUT: entity idexreg 应该 UUT: entity work.idexreg 没有使用条款use.work.all; 先前分析的实体idexreg的声明将不可见(未绑定,这将解释'U')。 当名称不可直接可见时,可以使用选定的名称。 IEEE Std 1076-2008 12.3可见性 在文本中给定位置出现标识符的含义由可见性规则定义,并且在重载声明的情况下由超载规则定义。 在本小节中考虑的标识符包括除保留字以外的任何标识 ...
-
调试VHDL:如何?(Debugging VHDL: How to?)[2023-05-29]
正如其他文章指出的那样,您可能需要像GHDL这样的模拟器 。 但是,要调试您的模拟,有几种不同的方法: 经典打印语句 - 只需在程序代码中混合writeline(output,[...]) 。 看到这个你好世界的例子。 如果你刚刚开始,那么添加打印语句将是非常宝贵的。 对于我所做的大部分模拟调试(这是我工作的一部分),我几乎完成了基于我们在设计和测试平台中构建的打印语句的所有调试。 它只用于最终调试,或者用于更难以处理的问题,我使用下一个调试方法。 “倾销”模拟( 对于GHDL请参阅此页面和此 页面 )。 ... -
你的链式信号向后,第一个输入要显示相等: architecture comp32_arch of comp32 is component comp1 port (a,b,g,l,e : in std_logic ; great,less,equal : out std_logic); end component comp1; signal gre : std_logic_vector(BW downto 0); signal les : std_logic_vect ...
-
在这种情况下,最终总和是正确的(“101010”+“110101”=“011111”), 但并非在所有情况下都是如此。 编辑2 :让我们仔细看看,为什么进位不会像你预期的那样波动。 位0(LSB)到5的操作数一起,请求进位从位0传播到位6的进位。操作数的位6产生进位,这是进位的加法器。 由于位0的cin为'0',所有中间进位也都为'0',但它应该通过进位链波动。 现在让我们来看看一位加法器。 您正在添加两个数字,因此AddOrSub为'0'。 有了这个, cout_bout的等式可以简化为: cout_bo ...
-
我看,你试图用2位比较器( >和= )创建4位比较器。 但我认为你有两个答案问题: 如果您只想创建没有任何比较器(独立)的4位比较器,请将A and B声明为有signed或unsigned进行比较(如果使用std_logic_vector则可以转换为此类型)。 有两个库可供使用: arith和numeric_std (只使用其中一个,两者都被违反)。 如果必须使用2位比较器。 使用这种方式: 建议A = [A3 A2 A1 A0] , B = [B3 B2 B1 B0] 。 运行两个步骤: 步骤1比较两个 ...
-
VHDL执行32位ALU(32 Bit ALU in VHDL Carry Out)[2022-05-03]
回答您的第一个问题:是,使用库IEEE.std_numeric中的unsigned。 它是这种操作的理想选择。 其次,可以通过比较输出和输入来检测溢出。 例如,在两个人的赞美中,如果你执行+ ve plus + ve和overflow,结果将设置msb,结果是-ve。 总结加法和减法 Addition | (+ve) - (+ve) | (+ve) - (-ve) | (-ve) - (+ve) | (-ve) + (-ve)| ----------------------------------- ... -
VHDL模2 ^ 32加法(VHDL modulo 2^32 addition)[2022-10-08]
unsigned(31 downto 0) 。 您引用的帖子中的2^MAX是一个错误,应该读取2^length 。 31 downto 0的长度是32。 想一想, 31 downto 0可以代表从0到2 ^ 32-1的数字,如果你能代表更大的数字,那么如果任何一个范围的加法将是模2 ^ 31就没有多大意义! 我不确定我理解你的第二个问题,但是加法模2 ^ 32产生的结果范围为0到2 ^ 32-1。 2 ^ 32是非法的,因此你无法用无符号代表它是很好的。 You are fine with unsigned ...