Comments (9)
Those are auto generated registers. Looks like there is a bug in the bit expansion.
The bogus Register enable= should not be there anymore (it isn't in the version on bubble), the fix for that went in a couple of weeks ago.
from opentitan.
Hi Mark,
Thanks for your reply. I see "Register enable=" removed after refreshing the page.
Can you please also check if mask 0x0 for gpio.DATA_IN is correct value?
Best Regards,
Gaurang
from opentitan.
@mdhayter @eunchan - Can you please clarify on mask values for INTR_STATE, INTR_ENABLE and INTR_TEST? For GPIO, all 32-bits of these register are writable, so I believe their mask values should be 0xffff_ffff.
I see that corresponding UART registers have mask values equal to 0xff as bits [7:0] are writable.
from opentitan.
Sorry for the delayed response. Could you please point the location of mask info? I cannot find in the c header, nor RTL (gpio_reg_pkg.sv)
from opentitan.
Sorry for missing your reply on this, please refer to following part in specification:
I am not able to point to the same in gpio.md file, but I can see the following in uart.md:
void uart_interrupt_routine() {
volatile uint32 intr_state = *UART_INTR_STATE_REG;
uint32 intr_state_mask = 0;
char uart_ch;
uint32 intr_enable_reg;
// Turn off Interrupt Enable
intr_enable_reg = *UART_INTR_ENABLE_REG;
*UART_INTR_ENABLE_REG = intr_enable_reg & 0xFFFFFF00; // Clr bits 7:0
if (intr_state & UART_INTR_STATE_RX_PARITY_ERR_MASK) {
// Do something ...
// Store Int mask
intr_state_mask |= UART_INTR_STATE_RX_PARITY_ERR_MASK;
}
if (intr_state & UART_INTR_STATE_RX_BREAK_ERR_MASK) {
// Do something ...
// Store Int mask
intr_state_mask |= UART_INTR_STATE_RX_BREAK_ERR_MASK;
}
// .. Frame Error
// TX/RX Overflow Error
// RX Int
if (intr_state & UART_INTR_STATE_RX_WATERMARK_MASK) {
while(1) {
uart_ch = uart_rcv_char();
if (uart_ch == 0xff) break;
uart_buf.append(uart_ch);
}
// Store Int mask
intr_state_mask |= UART_INTR_STATE_RX_WATERMARK_MASK;
}
// Clear Interrupt State
*UART_INTR_STATE_REG = intr_state_mask;
// Restore Interrupt Enable
*UART_INTR_ENABLE_REG = intr_enable_reg;
}
I am not sure if this is relevant (I do not understand *.md files that well), but I think we are populating mask value for INTR_STATE register.
We do not have similar thing in gpio or rv_timer INTR_STATE registers and I think because of this we are seeing default value of mask which is 0x1.
In case of rv_timer, it is correct because there is only single interrupt bit that can be updated and written.
However, gpio has all bits of INTR_STATE register that can be set and cleared.
The same problem exists in INTR_TEST and INTR_ENABLE registers, too.
from opentitan.
That is due to the multibit of interrupt signal. Let me take a look at auto interrupt register generation code.
from opentitan.
@eunchan this was discussed in the GPIO V3 signoff review. Please create an new issue on reggen update, and close this. Thx.
from opentitan.
@eunchan, ping.
from opentitan.
@eunchan what is the status on this old bug?
from opentitan.
Related Issues (20)
- [sw] Sram uninitialized address are accessed when using execute from SRAM mode HOT 2
- [ip,doc] Fix inaccurate references to reset behavior
- [rv_core_ibex] Bit-flip in Register File Muxing HOT 4
- [crypto, doc] Add writeups for some OTBN implementations to cryptolib docs.
- [RFC] Remove the opentitansession proxy HOT 2
- [chip_test:chip_sw_uart_tx_rx] Error-[IRIPS] Illegal range in part select HOT 1
- [rom_ext,csrng] Fix rom_ext for pending csrng interrupt
- Error and solution in "https://github.com/lowRISC/opentitan/blob/master/hw/ip/aes/dv/cov/aes_cov_if.sv"coverage definition of AES HOT 1
- [spi_device] Synchronize control and status bits at regular intervals HOT 2
- [hyperdebug] `apply_default_configuration` skips DFT apply workaround
- [crypto] Add algorithm-specific key import/export/check functions for asymmetric keys.
- [documentation] Enhance and fix hw/ip/README.md HOT 1
- [rv_core_ibex] Switch single to multi-bit encoding for Lockstep Enable HOT 4
- [top_darjeeling, mailbox] Test concurrent operation of multiple / all mailboxes
- [top_darjeeling,mailbox,tlt] Test randomized choice of polling vs interrupt-driven behaviour on the core side HOT 2
- RFC: Removing the S&P Layer in Scrambling for Top Earl Grey HOT 2
- [otbn,darjeeling] Loop stack push/pop at same time HOT 4
- [opentitanlib] Single source of truth for UART baudrates
- [sival,sensor_ctrl] Fix unexpected alert 5 HOT 8
- [site,doc] Ease documentation reading on large screen
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentitan.