1. A neural module comprising: a multilevel hierarchical structure of different types of neural compartments, wherein each neural compartment is individually customizable, and wherein each neural compartment is interconnected to one or more neural compartments of a previous hierarchical level and a next hierarchical level in the hierarchical structure; wherein each neural compartment is configured to: integrate spike signals from interconnected neural compartments of a previous hierarchical level; generate a spike signal in response to the integrated spike signals reaching a threshold of said neural compartment; and deliver a generated spike signal to interconnected neural compartments of a next hierarchical level; wherein the neural module has a corresponding hardware processor.